mode

mode
Type:string (keywords)
Scope:Display
Types:input

Possible keywords: useOrOverridePlaceholder

This property is related to the placeholder property. When defined a checkbox will appear above the field. If that box is checked, the field can be used to enter whatever the user wants as usual. If the box is not checked, the field becomes read-only and the value saved to the database will be NULL.

What impact this has in the frontend depends on what is done in the code using this field. In the case of FAL relations, for example, if the “title” field has its box checked, the “title” from the related metadata will be provided.

Warning

In order for this property to apply properly, the field must be allowed to use “NULL” as a value, the “eval” property must list “null” as a possible evaluation.

Examples

An input field with placeholder that can be overridden

      'input_28' => [ 
         'exclude' => 1,
         'label' => 'input_28 placeholder=__row|input_26 mode=useOrOverridePlaceholder eval=null default=null',
         'config' => [ 
            'type' => 'input',
            'placeholder' => '__row|input_26',
            'eval' => 'null',
            'default' => null,
            'mode' => 'useOrOverridePlaceholder',
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_basic"

An text field with placeholder that can be overridden

      'text_14' => [ 
         'exclude' => 1,
         'label' => 'text_14 placeholder=__row|text_12, mode=useOrOverridePlaceholder, eval=null',
         'config' => [ 
            'type' => 'text',
            'placeholder' => '__row|text_12',
            'eval' => 'null',
            'mode' => 'useOrOverridePlaceholder',
         ],
      ],
      // Example from extension "styleguide", table "tx_styleguide_elements_basic"