Welcome Guest, Not a member yet? Register   Sign In
Help with dynamic input fields
#1

[eluser]Markie577[/eluser]
Hi People,

I have a quistion,

I have a form with a submit to a function in my controller

This form is dynamically updated trough jquery.
So everytime I click a button, It will add another input field.
I have a var i in my jquery which add's a number after my input field.

Example

<input id=car'+i+' value=dynamic>

id car1 value=Volkswagen *click button*
id car2 value=Audi *click button*
id car3 value=Mercedes *click button*

Submit


Now I want my controller function getPost to get the POST data from the inputs.
so
$car = this->input->post('car???')

But I have no idea how to get these different car[i]!

perhaps a
for(i=0; i????; i++
{
$car[i] = this->input->post('car???')
}


Messages In This Thread
Help with dynamic input fields - by El Forum - 06-10-2010, 07:37 AM
Help with dynamic input fields - by El Forum - 06-10-2010, 07:58 AM
Help with dynamic input fields - by El Forum - 06-10-2010, 08:06 AM
Help with dynamic input fields - by El Forum - 06-10-2010, 08:14 AM
Help with dynamic input fields - by El Forum - 06-10-2010, 08:14 AM
Help with dynamic input fields - by El Forum - 06-10-2010, 05:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB