In a multistep form, when clicking next (or previous) the form is retrieved from cache, webform_conditional_add_js is called with the old JS settings, and only afterwards the form is rebuilt. If for any reason the new page has no JS fields, the old JS settings won't be overridden. This causes problems with the webform_bonus summary component, for instance.

Comments

plach’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB
plach’s picture

StatusFileSize
new771 bytes

Better patch: JS settings should be set only on webform forms.

plach’s picture

StatusFileSize
new1.55 KB

The previous patch was incomplete: if the form is being rebuilt (e.g. during an ajax response) we also need to reset the previous JS settings, otherwise array_merge_recursive() will turn string settings values into arrays, breaking everything on the client side.

tedbow’s picture

Status: Needs review » Fixed

@plach, Thanks I have commited this to 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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