Input inside Jquery UI Dialog not being sent?

后端 未结 5 1345
情深已故
情深已故 2020-12-08 21:44

The input fields in my dialog box aren\'t being posted, and i\'m not sure why...

i\'ve tested it on mac firefox and safari, and windows IE & firefox with the sam

5条回答
  •  感情败类
    2020-12-08 21:56

    I'm pretty sure jQuery UI breaks out the Dialog section from its normal place in the dom and then moves it to a different place. That would take your input element out of the form parent element. You can't submit a form without a form element, so that's why it fails.

    I would suggest rewriting the html as:

    Publish Date
    Unpublish Date

    If the publishSettings button needs to not be in the popup, then you could move it out of the form and just capture its value on the submit event and add it as a hidden input element before anything gets submitted.

    Best of luck.

提交回复
热议问题