0

I have a page that has a drop down list to select an action. this select has a name action_id. The use can have many actions. So, I added a link, when the user clicks it, I generate a new select using javascript and jquery and then add this new select to the DOM. this new select also has a name action_id.

Finally I would have many select(s) with the name action_id

I created this jsfiddle for you to show you what I mean

http://jsfiddle.net/FMQtL/

My question is how to validate each action_id select in my controller when I submit the form?

Many thanks

Update 1

Usually, I just do this in the controller:

Input::get('action_id');

but this time I have many action_id(s)

Anastasie Laurent
  • 877
  • 2
  • 14
  • 26

1 Answers1

1
$actions = Input::get('action_id');

Where actions should ba an array. From this you can pretty much do whatever you want. The easy way is to do a foreach.

foreach($actions as $action) {
//validate
}
JC Ricaro
  • 129
  • 3