create and submit dynamic forms

I want to develop a webpage wich dynamically adds and removes particular webforms (all webforms with the same structure) on the page (when pressing add and remove buttons). Adding and removing the webforms already works in the code below (using a jquery function), but I still struggle to create the related unique name values when submitting more forms. My idea is: - to put all forms in an array (forms() )- each with unique name values - ...and maintain in a array (formsavailable()) which forms have been added/used and which have been removed. I already added the code (below) to maintain formsavailable() when adding forms. But I dont know how to code formsavailable() for removing forms. Any ideas? Or are there simpler ways for creating the unique name value's with the described context? Please your comments. Thank you. The code:

text here


Why do the forms need different names? The form names are not submitted.

以上就是create and submit dynamic forms的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准