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

Formbuilder fixes #3595

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

alessandrocraeye
Copy link
Contributor

Type

  • Non critical bugfix

Resolves the following issues

#3193

Pull request description

When saving a field that contains field option(s) with special characters (for example a checkbox with the value: "J'accepte conformément à la clause de non-responsabilité") an AJAX error was thrown.
Encoding all characters of the values in the SaveField action fixes this issue.

But it still made the form fail validation as described in the linked issue, so I decoded the values before rendering the form to fix validation.

Not sure if this is the best way to fix this issue?
I only applied this to values & default values for now to fix functional errors, other form fields (placeholders, error messages, ...) also require a fix since for example adding the same value as placeholder shows a string with encoded characters.

Secondly I added a check to the formatRecipients function which was trying to run when no recipients are provided (when having selected the database method).

Field options with special characters would throw an ajax error on saving the field by encoding all characters this is fixed.
Secondly the validation would fail since there is a difference in encoding, so I decode the values before rendering the form.
When having chosen the database method no recipients are given resulting in an error from the formatRecipients function
Changed the function to only run when recipients are provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant