Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
We have created a custom property which contains a check box. The value of the check box is saved, but while editing the form the check box is unchecked... The custom properties are reset when loaded for edit...
In the attachment, the value of the custom property is highlighted
Any help would be grateful.
Thank you...
Comment | File | Size | Author |
---|---|---|---|
property.PNG | 10.17 KB | sk2013 |
Comments
Comment #1
fenstratI can confirm I've experienced this bug too. I've not got any time to look into it now but will do in the next 2 weeks.
Comment #2
sk2013 CreditAttribution: sk2013 commentedThanks Fenstrat! looking forward a Solution to this issue. If you have some thoughts /ideas you can share it here. We will also try to find a solution.
Thanks
Comment #3
torotil CreditAttribution: torotil commentedThat's a bit of a design-issue in form_builder so far: properties need to be put into the renderable array generated for the field. Under some circumstances form_builder reads them from the renderable. If the property is called 'custom' it's value needs to be stored under
$element['#custom']
.Comment #4
fenstrat@torotil very interesting findings. This bug slipped off my radar but we're still effected with it. When time allows I'll get to testing what you outlined.
Comment #5
torotil CreditAttribution: torotil commented@fenstrat: Usually
_form_builder_webform_form_builder_load_COMPONENT()
can be used to set the needed #property values. Once this is done things should work as expected. Although this _is_ a workaround for the underlying design issue we can't really change this for form_builder-7.x-1.x. Perhaps this needs some kind of documentation.Comment #6
torotil CreditAttribution: torotil commentedComment #7
torotil CreditAttribution: torotil commentedI think I have a fix for this issue in #2464957: [META] Property values not loaded into form_builder (because of the 1:1 renderable mapping) - Please consider to help testing the patch.
Comment #9
torotil CreditAttribution: torotil commentedI've committed the fix to 7.x-1.x. Please reopen if the bug persists.