Hidden field Options

All options are optional and can be left empty

Name Type Default Description
namestringlowercase label and replace spaces with '_'

no label -> name is generated i.e. 'f1'
This value is is the variable name used
valuestring | function''Function will run once at instantiation
parsecondition'display'This option determins if the field will be in the data result from myform.get()

examples


Name

new gform({fields: [
    {type: 'hidden', name: 'name_example'},
    {type: 'hidden', label: 'Label Example'},	
    {type: 'hidden'}
]})


Value

new gform({fields: [
{
  type: 'hidden',
  label: 'Value Example',
  value: 'This is a test'
}
]})


Parse

new gform({fields: [
  {
    label: 'Parse hidden Field',
    name: 'parse',
    type: 'checkbox'
  },
  {
    type: 'hidden',
    label: 'hidden Field',
    parse:[{
      type: 'matches',
      name: 'parse',
      value: true
    }]
  }
]})


© Escher Labs 2019