-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Feature Request: Radio Buttons Across Rows #149
Comments
I think this is interesting. Can you develop a bit more that idea? |
Sure. I currently use the Row field to allow users to populate a select on the public front-end, so it is defined like this:
Adding a third column like the below would allow the users to place a check on the value they want to be preselected on the front-end.
The issue is, when a boolean a checkbox is rendered they can select multiple "default" values where they should only be able to select one. Ideally we would be able to change the new line above to be something like this:
For the nova admin panel I see two possible solutions to this:
Behind the scenes this would continue to be a boolean field. I think #2 would be easier (no need to create a custom field for rendering) and be more in-line with what users would expect to see. Also, given that you've already expanded the Nova core Boolean class you wouldn't need to create an entirely new form control. |
I would really like this too. I think the |
To further expand on my suggestion 2 above, I think you could hook into the 'toggle' method on the Boolean Form Field component. This could look at a meta value set from a method call in the Boolean class. My knowledge of Vue isn't strong enough to know how to select other form components for the same type, but some usage of the custom event system in Vue would probably work. There might be a more "Nova" way to do it though. I don't think you'd really even need to worry about only doing this when on a row, since outside of a row there would only be one instance of a field on a form anyway. |
I have a case where I only want one row to have a field selected at a time. This is entirely a front-end request, maybe just finding a way to link boolean fields together across rows with the same 'name' parameter.
The text was updated successfully, but these errors were encountered: