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

Boolean fields not working with switch editor #6074

Closed
giannik opened this issue May 1, 2020 · 1 comment
Closed

Boolean fields not working with switch editor #6074

giannik opened this issue May 1, 2020 · 1 comment

Comments

@giannik
Copy link
Contributor

giannik commented May 1, 2020

Using the switch editor for boolean fields in a widget do not toggle the on/off state.

To repro :

  • Using the blog recipe create a new Contenttype with stereotype "Widget" and name it eg "Carousel"

  • For this new widget type add a boolean field name "Include Controls" and set the editor to "Switch" control.

  • Create a new page and in the flow part add a new widget "Carousel".

  • Try and toggle the state of the "Include Controls" boolean field. It does not change its state.

  • Publish the page and now the boolean field toggling works.

It seems it has to do with the rendered output for check box

As shown below in screenshot it renders 2 hidden input fields per boolean field. To my knowledge on mvc binding it should only render one.
But when you save the page and examine the html for the check box no hidden fields are rendered (which is why the switch toggle then works).
In first case if you delete the 2 hidden inputs then the switch works in create mode as well.

image

@Flarescape
Copy link

duplicate of #3944

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

No branches or pull requests

3 participants