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

Display rules not duplicating correctly with Userforms page duplication #1118

Open
ebakernz opened this issue Oct 21, 2021 · 1 comment
Open

Comments

@ebakernz
Copy link

ebakernz commented Oct 21, 2021

When I duplicate a UserDefinedForm page that has some form fields with display rules set, the new form display rule reference to the ConditionalFieldID is still referring to the original form field ID.

On the new form page in the CMS, the field's display rules conditional field dropdown appears to be set to the first field in the list. When the new form is published, the first field in the display rule - conditional field dropdown is saved as the value, which is incorrect. This is because the dropdown has no default value, and is not carrying over the value to the new instance of the form.

To replicate:
Create form, add field with a conditional / display rule and some fields above the conditional field, eg:
image
image

Duplicate the form page and inspect the display rules.
image

Inspect the database table for EditableCustomRule
New form's conditional field ID (line 2) is same as original form's field.
image

Publish form page, inspect database table EditableCustomRule_Live
Conditional Field ID is now referencing the first value in the dropdown (incorrect)
image

The issue can be fixed in the CMS by updating display rules to correct conditional field, publish.
Database is now referring to correct field.
image

However, it would be better if duplicating the form, also duplicated the display rules correctly.

@emteknetnz
Copy link
Member

Related #1115

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

2 participants