Hi,
I have created a ConfiForm that on user submissions creates a Task in Jira. I have a couple of WYSIWYG fields however these are causing me some problems. If a user types just one line the form works, but if they press ‘enter’ on the keyboard and create a new line in this field, Confluence shows the below error when they try to submit.
“invalid format. Unterminated string at 1225 [character 0 line 40]”
I have looked at line 40 in my JSON code but I can't seem to identify any issues and it will only throw the error if the ‘enter’ key is used when typing in this field. This happens to any WYSIWYG field I have in the form. Any idea why this is happening and is there a way to fix it?
Any help is greatly appreciated!
Cheers,
Chloe
Hi @Chloe P
In your mapping for this field in ConfiForms IFTTT macro add a escapeJSON function to ensure the value is safe for JSON field's value you are getting
Assuming your field name is yourWYSIWYfield then that would be something like below
[entry.yourWYSIWYfield.escapeJSON]
Alex
Thank you! This has fixed that error.
I also ended up using 'extractText' as I was hitting issues with the HTML so it now looks like the below:
[entry.yourWYSIWYGfield.extractText.escapeJSON]
This removes all the line breaks and dot points the user has input when it creates the Jira issue though. Is there any way to keep it in the WYSIWYG format?
Thanks for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that "extractText" might also be necessary, as Jira does not accept ALL the HTML that the WYSIWYG field could handle
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.