Set Text of Text Field
The Set Text of Text Field action replaces the content of a form’s text
field with the content you specify.
You can embed any valid JavaScript function call, property, global variable, or other expression in the text. To embed a JavaScript expression, place it inside braces ({}). To display a brace, precede it with a backslash (\{).
Example
The URL for this page is {window.location}, and today is {new Date()}.
To create a named text field:
Choose Insert > Form Objects > Text Field.
If prompts you to add a form tag, click Yes. For more information,
see Creating Interactive Forms.
In the Property inspector, type a name for the text field. Make sure the name
is unique on the page (don’t use the same name for multiple elements on
the same page, even if they’re in different forms).
To use the Set Text of Text Field action:
Select a text field and open the Behaviors panel.
Click the plus (+) button and choose Set Text > Set Text of Text Field from
the Actions pop-up menu.
In the Set Text of Text Field dialog box, choose the target text field from
the Text Field pop-up menu.
Enter text in the New Text field, then click OK.
Check that the default event is the one you want. If it isn’t, choose
another event from the pop-up menu.
If you don’t see the events you want, change the target browser in the
Show Events For pop-up menu.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100