-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 switch unuseable inside flow part #3944
Comments
A BagPart content item boolean field switch doesn't work. Here is the rendered Bootstrap switch :
If I'm removing the 2 hidden inputs that are placed in between the checkbox and it's label then the switch works. So, here the hidden inputs needs to be appended before the checkbox input or after it's label else it breaks the component. |
I tested the preview here with the predefined lists to make sure it's working with a BagPart and it worked. |
maybe a conflict when there is another one on the page like in the screenshot? |
Not related to having an other one. I added it on the main content type to see the difference in the HTML rendered but it was not working for the one in the BagPart before I added the one on the main content type. |
There is clearly an issue when the hidden inputs are appended since we can see that they are duplicates. |
Here is the HTML of the main content type one :
No hidden input required for this one. So it might be an issue with the preview script or the FlowPart script. |
It's not coming from the contentpreview.edit.js. |
When you add in a Form a widget that has a BooleanField, it adds 2 hidden input. Ex:
If the field is using a switch Editor, it prevents to switch the property after the widget is added. When it is saved and reedited, the 2 inputs don't appear anymore and it works. |
Can we check that this line is not generated twice also in a standard editor? |
This seems to be outdated and is fixed, since the admin has been upgraded to Bootstrap 5. |
As the title says, the boolean field switch does not work inside a flow part.
The switch does nothing on click.
The text was updated successfully, but these errors were encountered: