Form validation for field create with jquery - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Form validation for field create with jquery (/showthread.php?tid=69497) |
Form validation for field create with jquery - pippuccio76 - 12-04-2017 Hi at all sorry for english, i am doing an invoice . i have one row with input text article name= 'article[1]' and input text quantity name= 'quantity[1]' . With jquery i create a new row clicking a button for every click i add a row the name of input are increase (f.e. article[2] and quantity[2] , article[3] and quantity[3]) How can i validate this value ,i want set required for this field ... RE: Form validation for field create with jquery - PaulD - 12-05-2017 You could try something like this: (Not tested, probably full of bugs) PHP Code: $fields = count($this->input->post()); I think that should work. May not be the cleanest or neatest way to achieve this but it is one possible way. Paul. |