FIELD - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki
<FIELD/> : FormField
The <FIELD/> widget is used to create a field within a <FORM/>.
The <FIELD/> is hidden unless it is backed by a plugin package.
Unlike other hidden form field's, the <FIELD/> widget will always post when the <FORM/> is submitted.
Name | Type | Default | Description | Req |
---|---|---|---|---|
plugin | String | If specified, the field is created from the <PLUGIN/> using plugin=".(p1, p2, ...) where is the id of the <PACKAGE/>, is the class of the statefull or stateless widget and (p1, p2, ... pn) are the parameters passed to the class when it is created. Note: All parameters must be passed in order and be of the same type including named and optional parameters. |
Example #2 : A form with 2 hidden fields and an input.
<FORM>
<FIELD id="f1" value="1"/>
<FIELD id="f2" value="2"/>
<INPUT id="f3"/>
</FORM>
<FORM>
<!-- Custom Function Example -->
<TEXT id="t1" value="=pkg1.MyFunctions.sayHello('Cruel World')"/>
<BUTTON label="Click Me" onclick="t1.set(pkg1.MyFunctions.sayGoodbye('Cruel World'))"/>
<!-- Custom Widget -->
<TEXT id="text" value="This is what shows in the red box. get('text') is called from within the dynamic widget."/>
<WIDGET id="w1" plugin="pkg1.MyWidget({$id},{$get},{$set})"/>
<!-- Custom Form Field Control -->
<TEXT id="t2" value="{f1.value}"/>
<FIELD id="f1" plugin="pkg1.MyField({$id},{$get},{$set})" value="999"/>
</FORM>