0

How can i check which radio button has been checked from a list of radio buttons ? Is there any key in the form array which holds the checked radio ?

I am using an ajax call for a bunch of radios buttons and i would like to do some "checking" only if the right radio button was selected.

As an alternative , how can i append the "#ajax" parameter to only one radio button in a list of radio buttons ?

2
  • Tell us what your trying to achieve?
    – Alex Gill
    Jan 9, 2013 at 11:50
  • @AlexGill was i clear enough ?
    – Vlasin
    Jan 9, 2013 at 11:55

1 Answer 1

1

You can check the element's value in $form_state['values']. Add the full parameter list ($form, &$form_state) to the form builder function.

For example: function mymodule_something_form($form, &$form_state) {

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.