I have a multi-page form. On the second page is a form within a table. Each row contains two select options that should be mandatory and two regular, non-mandatory fields. The form can have a number of rows, depending on a user choice on the previous page.
One select option has a name attribute styled name[], the other has a name attribute styled make[]. Formit seems to ignore validate=`name[]:required` and `make[]:required`. If instead I specify that name[] and make[] needs to have more than 1 character, eg, validate=`name[]:minLength=^1^`, it prevents submission of the form if no drop down is chosen, but it also prevents it when a selection is made. Can't win!
Can anyone suggest a solution?
[[!FormItRetriever]]
[[!FormIt?
&hooks=`validate,redirect`
&validate=`name[]:required`
&redirectTo=`35`
&store=`1`
&submitVar=`go`
]]
<td><select id="type" name="name[]">
<option value="" [[!+fi.type:FormItIsSelected=``]]>choose device</option>
<option value="Tablet" [[!+fi.type:FormItIsSelected=`Tablet`]]>Tablet</option>
etc