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

dev/core#3815 Set options_per_line to zero when changing Custom Field html_type #26415

Merged

Conversation

larssandergreen
Copy link
Contributor

@larssandergreen larssandergreen commented Jun 2, 2023

Overview

See issue.

Ideally, this would be fixed at the template level, but there are a lot of different tpls that display custom fields and I don't think it makes sense to try to change each one of them. This fix just clears options_per_line in the custom fields form when changing the html_type away from Radio or CheckBox. Not ideal as you can still set options_per_line via API and you lose the options per line if you change the html_type from, for example, Radio to Select and back to Radio, but this is an improvement.

Before

Options per line still has a value when it is hidden.

After

Options per line is cleared when it is hidden.

@civibot
Copy link

civibot bot commented Jun 2, 2023

No issue was found matching the number given in the pull request title. Please check the issue number.

@civibot
Copy link

civibot bot commented Jun 2, 2023

(Standard links)

@civibot civibot bot added the master label Jun 2, 2023
@mlutfy mlutfy merged commit 0760854 into civicrm:master Jun 6, 2023
@mlutfy
Copy link
Member

mlutfy commented Jun 6, 2023

Thanks @larssandergreen !

I could reproduce the bug and while I agree the fix is a bit of a workaround, it's annoying enough for users imo that we should merge a quickfix.

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

Successfully merging this pull request may close these issues.

2 participants