This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » Javascript plugins » How to get value from checked element? By array name selector.
How to get value from checked element? By array name selector. [message #79752] Fri, 12 June 2009 11:20 Go to next message
boooz  is currently offline boooz
Messages: 2
Registered: June 2009
Junior Member
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!
Re: How to get value from checked element? By array name selector. [message #79792 is a reply to message #79752 ] Fri, 12 June 2009 22:01 Go to previous messageGo to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
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 :
$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 ^^;

[Updated on: Fri, 12 June 2009 22:02]

Re: How to get value from checked element? By array name selector. [message #86848 is a reply to message #79792 ] Fri, 16 October 2009 13:26 Go to previous message
kekcius  is currently offline kekcius
Messages: 4
Registered: June 2009
Location: Moscow
Junior Member
xplo wrote on Fri, 12 June 2009 22:01

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 :
$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?
Previous Topic:sfMilonicPlugin
Next Topic:Symfony and extjs2plugin
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software