Page break code in the 'Custom Javascript' section

  • 11 July 2018
  • 1 reply
  • 9 views

Badge +1

Hi all,

 

Bit of an unusual one.

 

I have entered the following code in to the 'Custom Javascript' field of the Form Settings section:

 

216970_pastedImage_3.png

 

When I save & close the settings and preview the form, it does exactly what I want which is great...

 

 

216971_pastedImage_4.png

 

 

However, when I re-open the Form Settings, the page breaks have been actioned in the text and it now appears as below:

 

216969_pastedImage_2.png

 

 

If I then save the settings and preview the form, the code no longer works and no text is pre-populated in the multi-line text box.

 

Therefore every time I open the Form settings to make a change, I have to re-format the custom Javascript and add back in the '<br>' text.

 

 

Is this a known issue or is there anything I can do so that I don't have to edit the text every time I open the settings?

(I am very new to Nintex and/or Javacript so apologies if this is fairly straightforward)

 

Thanks in advance!


1 reply

Userlevel 4
Badge +9

Yes it is a bug, Nintex Designer interprets the HTML unfortunately.
The workaround would be to use a form variable with your text in it and use that variable. I also strongly suggest that you change NWF$(document). ready(function(){....}) with NWF.FormFiller.Events.RegisterAfterReady(function(){....}) which is the correct event for Nintex forms, NWF$(document).ready() is really tricky ;)

Reply