1. Home
  2. Docs
  3. For Developer
  4. Element Attributes

Element Attributes

When you declare new element with AZP the attrs parameter is an array hold all setting fields for your element. Each setting field is described in a single array.

Parameters for element attrs field

Param name Type Description
 type string Setting field type. “Available types” section bellow list all types
 param_name string Setting field name, must be unique in the attrs array and will be use in the element template file
 label string Setting field label
 desc string Setting field description
 value array Setting field value options with key/value pair format. Example: array of options for selec field type
 default string Default setting field value
 iscontent string yes/no whether this setting field is content field for storing html text. Example: for textarea or editor type
 show_in_admin bool true/false whether show setting field value in admin, bellow element title and icon
 multiple bool true/false. Is multiple field or not? Ex: for select, checkbox field type.

Available Types

Value Description
 text text input field
 hidden hidden input field
 textarea textarea field
 select select field with options from value parameter array
animationselector display a dropdown field to select css animation value
checkboxdisplay checkbox fields from value parameter array
radio display radio fields from value parameter array
switch is radio type with this value array: ‘value’=> array(‘value’=> array(  ‘Yes’=>’1’,  ‘No’=>’0’, ) 
image single image selector
images multiple images selector. To use image_attrs parameter this element setting field must be element content field
iconselector Awesome icons font selector
editor default WYSIWYG Editor
color color picker
googlefonts List of google fonts
label Display a label text only and has no value