Modify Field (Simple actions)
Modifies a field in the current document.
Defined in
Simple actionsType
Document (Server)Syntax
Note: This is the XSP source code. The
UI presents the simple action as a dialog with a box for each argument.
modifyField name="string" value="generic"
Arguments | Description | UI presentation |
---|---|---|
name |
Name of a field in the current document. | An edit box plus the diamond icon. You can type the field name in the edit box or click the diamond to dynamically compute the value. |
value |
Value to put in the field. | An edit box plus the diamond icon. You can type a value in the edit box or click the diamond to dynamically compute the value. |
Usage
See getElementById for getting field names.
Examples
Note: These examples present XSP source
code which can be inserted under the Source tab taking care to keep
the XML well formed. To use the UI, select or enter the arguments
in the simple action dialog.
This button changes the inputText1
edit
box value to green
.
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:modifyField name="inputText1" value="green"></xp:modifyField>
</xp:this.action>
</xp:eventHandler>
</xp:button>