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...

CommentFileSizeAuthor
property.PNG10.17 KBsk2013
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fenstrat’s picture

Version: 7.x-0.9 » 7.x-1.x-dev
Category: Support request » Bug report

I 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.

sk2013’s picture

Thanks 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

torotil’s picture

That'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'].

fenstrat’s picture

@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.

torotil’s picture

Component: Miscellaneous » Documentation

@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.

torotil’s picture

torotil’s picture

I 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.

  • torotil committed ced03c0 on 7.x-1.x
    [webform] Make $element['webform_component'] the authoritative storage...
torotil’s picture

Status: Active » Fixed

I've committed the fix to 7.x-1.x. Please reopen if the bug persists.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.