Global variables with specific text


#1

Hi all,

Trying to set up a global variable which based on what you write (specifically) in a text box on the first page will then change text of widget(s) on the next page(s)

Any ideas would be great!

Thanks

Rob


#2

You can use the OnTextChange event of the text box to set the value of the global variable.

OnTextChange
If true
Set value of YourGlobalVariable to: [[This.text]]

That will set the variable as the user types. Then use the OnPageLoad event of the next page to set text using that variable.

OnPageLoad
If true
Set text of SomeWidget to: [[YourGlobalVariable]]


#3

Thanks worked a treat,

If I wanted to have it so irrelevant of what was typed, so if ‘example’ was written like user@example.com because example is still mentioned it still works

so they could write in the text field ‘example’ ‘user@example.com’ ‘blarblarblarexample’ because example is mentioned it still works

I’m guessing something like [[This.‘text’.mentioned]] or something like that might do the trick, also what is >> [[This.something]] code? conditional formatting commands? I’m unsure of the name or what to call them!

Thanks

Rob


#4

I’m not entirely clear on what you want, but what I inferred is that if the text the user types contains the string “example” only then is the variable set.

You’d need a conditional case.

On your text field

OnTextChange
If text on this widget contains "example"
Set value of YourGlobalVariable to: [[This.text]]


closed #5

unlisted #6