dynamic input fields validation in codeigniter |
I'm working on a web application that includes a feature to add information of vehicles of users, if a user have more than one vehicle he/she can add those details by "add another" like option. i have main form which has 8 fields.
to duplicate the main form i am using using http://tristandenyer.com/demos/dynamic-form.html script. this script does what i want but the thing is i have no idea how to validate the from fields generated by this script. by clicking "add section" option the script generates a copy of original form, the field names of form goes as "ID2_first_name" (ID2 mean second copy of original form if the form it goes like ID3_first_name) ex: form 2 Code: <input class="input_fn" type="text" name="ID2_first_name" id="ID2_first_name" value=""> form 3 Code: <input class="input_fn" type="text" name="ID3_first_name" id="ID3_first_name" value=""> .... if a user have 5 vehicles the field of the form named like ID2_first_name.....ID5_first_name. how can i apply validation rules to these dynamic fields. i am using codeigniter mainly for this. |
Messages In This Thread |
dynamic input fields validation in codeigniter - by greenarrow - 07-16-2016, 09:00 AM
RE: dynamic input fields validation in codeigniter - by InsiteFX - 07-16-2016, 01:18 PM
RE: dynamic input fields validation in codeigniter - by greenarrow - 07-16-2016, 01:59 PM
RE: dynamic input fields validation in codeigniter - by PaulD - 07-16-2016, 02:54 PM
RE: dynamic input fields validation in codeigniter - by Wouter60 - 07-16-2016, 11:33 PM
RE: dynamic input fields validation in codeigniter - by greenarrow - 07-16-2016, 11:56 PM
RE: dynamic input fields validation in codeigniter - by PaulD - 07-17-2016, 08:48 AM
RE: dynamic input fields validation in codeigniter - by mwhitney - 07-18-2016, 02:15 PM
|