Variable into text field

Hi all, does anyone know how or whether you can insert a variable into a text field? I have a link and I would like to insert a variable there. The code looks like this:

<p>Contact our <a href="mailto:app.getSharedData().myVar">Team</a></p>

Thanks in advance

Vici

Hello Vici,

I believe this won't work in a default text item element to have variable to insert in the Source (html).

However, you can do the below approach:

-Assign the value of the variable to another text item element (as hidden).

-Then, create two seperate text elements that has different href values.

-Create a rule to show/hide those two text elements that depends in hidden text element value.

Hope this helps.

Thanks,

Jayve

You cannot insert a javascript variable, but you can insert a field value...

So you could use javascript to set the value of the field and then use the insert menu to insert it into your text.

You can also just set the entire content of the text using the setContent() function (but using this method does not allow you to keep formatting).