[eluser]brucebat[/eluser]
Hi all,
I have a problem for you to wrap your brains around.
How can you tell the differene between a row of fields which all have the same html name tag.
Image shown below
This was cceated using a for loop of 14 times and within it using the
form_helper functions.
Code:
for ($i =0; $i< 15; $i++)
{
//time part of event field
echo form_input ($i),
//the event itself
form_input ($i),
//supplies used
form_input ($i),
//successful?
form_dropdown ($i, $success),
//comment if necessary
form_input ($i);
echo '<br/>';
}
I thought about concatenating them:
e.g.
Code:
form_input ("time".$i);
To give a unique name for each field within a single row but I dont know if that would work using a forloop later on in my validation controller?
How will i be able to distinguish so I know that this is e.g.
"supply field no 15 out of 30 etc?"
Is there another variable I can put in form_input function?
Thanks