Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable group not saving radio options initially #246

Closed
joshuadavidnelson opened this issue Mar 11, 2015 · 3 comments
Closed

Sortable group not saving radio options initially #246

joshuadavidnelson opened this issue Mar 11, 2015 · 3 comments

Comments

@joshuadavidnelson
Copy link

I've created a sortable group with a couple of fields, one of which is a radio option that defaults to one of three choices. It appears to work just fine in populating new rows to the group, and saving values from the other fields, but on the post-new.php save it only stores the first group's radio button value and the others revert to the default. It works fine on the the post.php screen's save, so it just needs to be created and then re-saved with new values.

kynetiv pushed a commit to kynetiv/CMB2 that referenced this issue Apr 28, 2015
…a checkbox or radio input.

If the input is a checkbox or radio, the original value is needed or saving will not save the value (subsequent post saves work because inputs  will then have the required value set).
This patch conditionally adds values to radios and inputs on new repeatable and sets the checked attribute only on the default option (radios).
Fixes issue CMB2#257 (this will set reset text inputs as well), and CMB2#246 & CMB2#263(restores radio and checkbox values on new row saves)
@jtsternberg
Copy link
Member

related #341

@jtsternberg
Copy link
Member

Should be good in the trunk branch. please test.

@joshuadavidnelson
Copy link
Author

This looks to be working now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants