Element Field Types
There are several field types built into Fusion that can be used when mapping an element with the fsn_map function.
text
A text input form field.
textarea
A textarea form field.
checkbox
A checkbox.
radio
A set of radio buttons.
select
A dropdown list.
textarea_rte
A WordPress rich text editor.
colorpicker
A WordPress color picker.
image
A button that launches the WordPress Media Library for selecting an image.
video
A button that launches the WordPress Media Library for selecting a video.
button
A field for creating a link to both external and internal content, or for triggering collapsible or modal content.
box
A set of 4 text inputs for setting top, right, bottom, and left values.
custom_list
A drag-and-drop sortable list of items.
components
A list of Components to select from and buttons to optionally add or edit a Component in a modal.
note
A string of text meant to provide information about a section or set of fields when further clarification is needed. Uses the help parameter.
Parameters
type
(string) (required) The Field Type
param_name
(string) (required) The parameter name, All lowercase, alphanumeric characters and underscores only. This parameter will output as the shortcode attribute name unless the content_field parameter is set to true.
options
(array) (required for radio and select field types) The selectable options for a radio or select fields.
label
(string) (required) The parameter label in the edit Element modal.
help
(string) (optional) Help text to further describe a parameter
class
(string) (optional) CSS class that gets added to the field wrapper div in the edit Element modal
section
(string) (optional) Controls the tabbed section under which the parameter appears in the edit Element modal. If this is not set, the parameter will appear under the General tab. Other built in options are advanced and style
content_field
(boolean) (optional) Use this parameter value as the shortcode $content rather than as a shortcode attribute. Can only be used on one parameter per element. Must be used on a textarea field.
encode_base64
(boolean) (optional) Base64 encode the parameter value. Can be used on a text or textarea field type.
encode_url
(boolean) (optional) URL encode the parameter value. Can be used on a text or textarea field type.
id
(string) (required for custom_list type) A unique ID referencing a custom list. Only used on the custom_list field type.
item_params
(array) (required for custom_list field type) An array of field parameters for custom list items. Only used on the custom_list field type.
dependency
(array) (optional) Hide or show the parameter based on the value of another parameter
Dependency Array
param_name
(string) (required) The param_name of the parameter on which to depend
One of the following is required:
not_empty
(boolean) Set to true to show parameter when linked param has any value
value
(string|array) Set to true to show parameter when linked param has a matching value