I'm dynamically creating a form with Solution Model. I have a case when I try to add a text area linked to a form variable (also a solution model) with a default value. The default value is taken from a dataset. If it contains multi lines, as normal if entered by a text area, then that value is not assigned to the variable and hence, not displayed by the text area.
The default value as shown in the developer debugger is:
- Code: Select all
"line 1
line 2
3"
My code is:
- Code: Select all
var txtAnswerText = form1.newVariable("vTextAnswer_"+i,JSVariable.TEXT);
txtAnswerText.defaultValue = "'" + dataset.getValue(i,5)+"'";
var new_editbox = form1.newTextArea(txtAnswerText,200,i*25+startY,375,50);
Is there a way to parse the variable or assign it differently?
Thanks!
Gabriel