onChange

onChange
Required:false
Type:string
Scope:Display

If set to reload, it triggers a form reload once the value of this field is changed. This is automatically set for fields specified as record type in the control section.

The onChange property is useful for fields which are targets of a display condition’s FIELD: evaluation.

On changing the field a modal gets displayed prompting to reload the record.

The record needs to be reloaded to show the changed fields.

The record needs to be reloaded to show the changed fields.

Examples

Select field triggering reload

Screenshot of field tx_styleguide_elements_select:select_requestUpdate_1

Screenshot of field tx_styleguide_elements_select:select_requestUpdate_1

      'select_requestUpdate_1' => [ 
         'exclude' => 1,
         'label' => 'select_requestUpdate_1',
         'onChange' => 'reload',
         'config' => [ 
            'type' => 'select',
            'renderType' => 'selectSingle',
            'items' => [ 
               '0' => [ 
                  '0' => 'Just an item',
                  '1' => 1,
               ],
               '1' => [ 
                  '0' => 'bar',
                  '1' => 'bar',
               ],
               '2' => [ 
                  '0' => 'and yet another one',
                  '1' => -1,
               ],
            ],
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_select"