This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

How to get value from checked element? By array name selector.

Forum to discuss ExtJS and other JS plugins

How to get value from checked element? By array name selector.

by boooz » Fri Jun 12, 2009 11:20 am

Helllllo,

Is anybody have any idea how can i get a value from active radio input field looks like this I presented below...

<input id="a-1" type="radio" name="foo[bar]" value="1">
<input id="a-2" type="radio" name="foo[bar]" value="2">
<input id="a-3" type="radio" name="foo[bar]" value="3">

Thanks!
boooz
Junior Member
 
Posts: 2
Joined: Wed Jun 10, 2009 6:13 pm

Re: How to get value from checked element? By array name selector.

by xplo » Fri Jun 12, 2009 10:01 pm

maybe you should read the form tutorial to use symfony sfForm class to avoid to do it manualy.

Anyway it should be something like that :
Code: Select all
$input_checks = $request->getParameter('foo[bar]');


edit : why is it in javascript plugin section of the forum ? maybe you wanted to do something with javascript ^^;
xplo
Faithful Member
 
Posts: 593
Joined: Wed Sep 17, 2008 3:23 pm

Re: How to get value from checked element? By array name selector.

by kekcius » Fri Oct 16, 2009 1:26 pm

xplo wrote: maybe you should read the form tutorial to use symfony sfForm class to avoid to do it manualy.

Anyway it should be something like that :
Code: Select all
$input_checks = $request->getParameter('foo[bar]');


edit : why is it in javascript plugin section of the forum ? maybe you wanted to do something with javascript ^^;


Yes! :)~ :-)~ :smile: I need to do it! What do you recommend?
kekcius
Junior Member
 
Posts: 4
Joined: Tue Jun 02, 2009 10:15 am
Location: Moscow