JQuery Ajax Form and Dynamically created form elements not submitting

后端 未结 2 1528
心在旅途
心在旅途 2020-12-21 03:43

I\'m writing a form that has some text input elements loaded dynamically when a select list is changed.

The problem is that when I submit the form those elements are

相关标签:
2条回答
  • 2020-12-21 03:57

    It's pretty simple, just append the form element to the body tag and set its style to 'display:none'

    0 讨论(0)
  • 2020-12-21 04:06

    Your problem seems to be that the dynamically added input elements do not have name attributes. Input elements require name attributes if you want their values to be included in the submitted data.

    0 讨论(0)
提交回复
热议问题