Welcome Guest, Not a member yet? Register   Sign In
Inserting multiple form fields with same name
#2

[eluser]skunkbad[/eluser]
Since you are already using jQuery, why not just create a hidden form field that holds the number of sets of fields. For instance, on intial page load, the field would have a value of 1. If you add a set, jQuery adds more fields with a -2 extension, and updates the value of the hidden field. Upon submission, you use the value of the hidden form field to dynamically create validation rules for however many sets of fields you need to check. It's pretty easy to do. You could even submit the form via ajax and return a response that you display in a modal dialog box.


Messages In This Thread
Inserting multiple form fields with same name - by El Forum - 03-01-2012, 07:05 PM
Inserting multiple form fields with same name - by El Forum - 03-01-2012, 11:46 PM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 08:41 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 08:50 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 11:20 AM
Inserting multiple form fields with same name - by El Forum - 03-02-2012, 09:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB