[eluser]bonjurkes[/eluser]
Hello,
I used a script that is premade with checkboxes for my own project. But at the source of the script that i found it required for form fields to get validated before submitted.
So here comes the problem, i have like 61 checkboxes on my form, and writing like this :
Code:
$this->form_validation->set_rules('a60', 'a60', 'trim|max_length[255]');
will take so much time and wont look so nice in the code. My all formfield's id stars with "a", so is there a way to use something like "$a. $i" for setting rules for every field ? How can i do that ? Otherwise i have to type like a61, a60, a59 etc.