-
Notifications
You must be signed in to change notification settings - Fork 10
Question - Radio elements and post-validation state #10
Copy link
Copy link
Open
Description
Hey,
I've a simple form with three radio elements. My issue is that if validation fails on any of the elements in the form, the state of the radio elements is lost. This does not happen for the text elements. I'm wondering is there something i'm expected as the form developer to handle this case or should the framework be expected to handle this.
My code
$gender_drop_down = WP_Form_Element::create('radios')->set_name('bhaa_gender')
->set_label('Gender')->set_classes(array('radio-inline'))
->add_option('M','M')
->add_option('W','W');and a screen shot of the form
Note - The gender field was selected before this form was submitted. I just want to avoid have to re-check the three radio buttons each time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
