Forms

List of field types

radio

Simple radio button field

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
values required Array - Array with value=>label params. Labels should be wraped by __() method for translation
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'radio',
    'name' => 'type',
    'label' => __('Style', 'row'),
    'values' => array(
        'fluid' => __('Fluid', 'row'),
        'boxed' => __('Boxed', 'row'))
);

checkbox

Simple checkbox field

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'checkbox',
    'name' => 'inverse',
    'label' => __('Inverse', 'component') // Label for checkbox
)

color

Color Picker

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'color',
    'name' => 'color',
    'label' => __('Text color', 'component'), // Label for color picker
    'default' => '#fff'
)

datepicker

The datepicker is tied to a standard form input field. Use this field to unobtrusively add choice of date

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'datepicker',
    'name' => 'date',
    'label' => __('Date', 'component'),
    'default' => '$date->format('m/d/Y')'
)

datetimepicker

The datetimepicker is tied to a standard form input field. Use this field to unobtrusively add choice of time

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'datetimepicker',
    'name' => 'time',
    'label' => __('Time', 'component'),
    'default' => '16:00'
)

gallery

The gallery is button. Use this field to add choice of images for gallery component e.t.c.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
btn_value optional String null Value text for button
btndel_value optional String null Value text for button delete
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'gallery',
    'name' => 'ids',
    'label' => __('Gallery', 'component'),
    'btn_value' => __('Select images', 'component'),
    'btndel_value' => __('Delete images', 'component'),
    'default' => '16:00'
)

hiddeninput

Simple input field with type hidden

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'hiddeninput',
    'name' => 'anchor',
    'default' => ''
)

input

Simple input field with type text

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'hiddeninput',
    'name' => 'anchor',
    'default' => ''
)

image

Use this field to add choice of only one image. For choice several images use field gallery

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
btn_value optional String null Value text for button
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'image',
    'name' => 'image',
    'label' => __('Image', 'component'),
    'btn_value' => __('Select images', 'component'),
    'default' => '/img/thumbnail_preview.jpg'
)

inputlink

Simple input field with type text. When text input is in state focus will bring up a box where you can enter the URL

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'inputlink',
    'name' => 'url',
    'label' => __('Image', 'component'),
    'rule' => array(
        'show' => array('action_image' => ['link','zoom'])
    ),    
    'default' => ''
)

Number

Simple input field with type text. You can use this field when you need enter only number

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'number',
    'name' => 'number',
    'label' => __('Count image', 'component'),
    'default' => ''
)

list

Field that contains shortcode text of the components which are components of more complicated ones. For example: tabs, accrodion

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
type required String - It is the name of the component that contains this list
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
default optional String null Default value

Example:

array(
    'field' => 'list',
    'name' => 'content',
    'label' => __('Count image', 'component'),
    'type' => 'tabs',
    'default' => ''
)

postlist

List of the custom checkboxes for custom posts

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
type required String - It is the name of the component that contains this list
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
post_type required String null Post types that should be presented in the list
post_type_add required String null Post type for the new post that can be created by clicking 'add_post' link
label_btn optional String null Label for the link that leads to postcreation page
label_refresh_link optional String null Label for the button, refreshing existing posts
default optional String null Default value

Example:

array(
    'field' => 'postlist',
    'name' => 'ids',
    'label' => __('Portfolio list', 'component'),
    'post_type' => 'portfolio',
    'post_type_add' => 'portfolio',
    'label_btn' => __('add portfolio', 'component'),
    'label_refresh_link' => __('refresh', 'component'),
    'default' => ''
)

radiocustom

Custom radio buttons. Each radio has background image.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
values required Array - Array with value=>label params. Labels should be wraped by __() method for translation
default optional String null Default value

Example:

array(
    'field' => 'radiocustom',
    'name' => 'type',
    'label' => __('Type', 'component'),
    'values' => array('icon_top' => '', 'icon_left' => '', 'icon_right' => '', 'icon_center' => ''),
)

range

Range field. Defines range of the numbers.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value (Write 2 numbers with coma, which would limit the range)

Example:

array(
    'field' => 'range',
    'name' => 'range',
    'label' => __('Range', 'component'), 
    'default' => '0, 17'
)

select

Simple select field.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
values required Array - Array with value=>label params. Labels should be wraped by __() method for translation
default optional String null Default value

Example:

array(
    'field' => 'select',
    'name' => 'type',
    'label' => __('Type', 'component'), 
    'values' => array('icon_top' => '', 'icon_left' => '', 'icon_right' => '', 'icon_center' => ''),
    'default' => 'icon_top'
)

slider

The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
type required String basic 2 types of slider basic or opacity
min required when type basic Integer 0 The minimum value of the slider.
max required when type basic Integer 100 The maximum value of the slider.
step optional when type basic Integer 1 Determines the size or amount of each interval or step the slider takes between the min and max. The full specified value range of the slider (max - min) should be evenly divisible by the step.
input_id required String - input id where saves slider value
default optional String null Default value

Example:

array(
    'field' => 'slider',
    'name' => 'bg_opacity',
    'type' => 'opacity',
    'input_id' => 'sl-input',
    'label' => __('Background opacity', 'component'),
    'default' => '1'
)

iconlib

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
default optional String null Default value

Example:

array(
    'field' => 'iconlib',
    'name' => 'iconlib',
    'label' => __('Icon', 'component'),
    'default' => 'glyphicon glyphicon-asterisk'
)

textarea

Field with tinymce plugin text editor.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
tinymceSettings required Array array('editor_class' => 'component') Array with parameters for the tinymce plugin editor
default optional String null Default value

Example:

array(
    'field' => 'textarea',
    'name' => 'content',
    'label' => __('Content', 'component'),
    'tinymceSettings' => array('editor_class' => 'component_param', basic), //'basic' class shows is this field required or not
)

spiner

Field with number input and arrows to control (increase or decrease) this number.

Key Required Type Default Description
field required String - Field type
name required String - This name will be used for shortcode attribute and name param in form
label optional String null Label for Form field. Label should be wraped by __() method for translation
rule optional Array array() From what field depends on
tip optional String null Detailed information
min required Integer array() Miniimum limit of the number
max required Integer null Maximum limit of the number

Example:

array(
    'field' => 'spiner',
    'name' => 'position_y',
    'label' => __('Position image y', 'component'),
    'min' => 0,
    'max' => 10,
)