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
checkbox
display 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