Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,932
Community Members
 
Community Events
184
Community Groups

WYSIWYG fields wont allow more than 1 line of text in ConfiForm

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

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2023

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

Hi @Alex Medved _ConfiForms_

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!

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2023

Yes, that "extractText" might also be necessary, as Jira does not accept ALL the HTML that the WYSIWYG field could handle

Alex

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events