All options are optional and can be left empty
Name | Type | Default | Description |
---|---|---|---|
name | string | lowercase label and replace spaces with '_' no label -> name is generated i.e. 'f1' | This value is is the variable name used |
value | string | function | '' | Function will run once at instantiation |
parse | condition | 'display' | This option determins if the field will be in the data result from myform.get() |
new gform({fields: [
{type: 'hidden', name: 'name_example'},
{type: 'hidden', label: 'Label Example'},
{type: 'hidden'}
]})
new gform({fields: [
{
type: 'hidden',
label: 'Value Example',
value: 'This is a test'
}
]})
new gform({fields: [
{
label: 'Parse hidden Field',
name: 'parse',
type: 'checkbox'
},
{
type: 'hidden',
label: 'hidden Field',
parse:[{
type: 'matches',
name: 'parse',
value: true
}]
}
]})