Block Control Fields

Block Controls can be accessed from the block options in Edit Mode. They use Block Fields to store their values.

In our example we are setting a toggle control to allow user to show/hide the title. All controls must have the hidden class and the name attribute (the name of the field). The data-label attribute is optional and it's common for all control types. Other control types, can have more attributes.


ARGUMENTS

  • data-label: the label of the control
  • data-classes: the classes that you want added to the control element.
  • data-value: sets the starting value of the control
  • data-titles: comma seperated list of titles (for controls with multiple options).
  • data-options: the real values that will be stored in the field (for controls with multiple options, comma seperated list).


control-toggle

A toggle control that can be switched on and off. It stores a string with values 'on' or 'off'.

control-input

An input control that can store an alphanumeric value.

control-date

A date input control.

control-radio

A radio control that lets you select one of many options.

control-dropdown

A dropdown control.

control-gallery

A gallery control.