psy Posted June 26, 2015 Share Posted June 26, 2015 After trawling/trying everything this forum and everything I could search for on the topic, I couldn't find a solution to my problem. Scenario: I have a Fieldtype Options field as radio buttons. It's a required field 'display_price' with a default value of, 'Price'. The other choice is 'Text'. To preset a radio field with a default value it must be 'required'. I have fields that show/hide dependent on the value of 'display_price'. If I don't set 'display_price' as a required field, the page edit screen throws a warning that the default cannot be set. When 'required' is set, on the admin page edit, the show/hide works perfectly. However, regardless of the choice of the radio field, the dependent field's value is never saved. Removing the 'required' status of the 'display_price' field results in the associated subfield being saved. HOWEVER, from the client's POV, it's necessary that the 'display_price' be a required field. Help! TIA Link to comment Share on other sites More sharing options...
LostKobrakai Posted June 27, 2015 Share Posted June 27, 2015 Use required_if to make the field required only under the same circumstances as the show_if. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now