The icons field is used to add icons to repeatable sections. The icons provide the following functionality to a repeatable section:
Add a new row to the repeatable section
Remove a row from the repeatable section
- Move Up
Move up one row
- Move Down
Move down one row
Drag and drop the row to a new position
A demo of the icon functionality and available styles is given below. Try clicking the icons to see this field in action:
When a form section is set to be repeatable, WS Form will automatically add an icons field to it if one does not already exist.
The icons field can be placed within the section it will control, or in a different section to control it remotely. If the icons field is placed outside of the section it will control, only the ‘Add’ and ‘Remove’ functionality will be available.
To learn how to add, edit, clone, move, resize, offset, or delete an icons field, please click here.
When editing an icons field, the field settings sidebar will appear. This contains the following tabs:
You can edit any of the settings in each of these tabs and then click the ‘Save’ button to save your changes. If you do not want to save your changes, you can click the ‘Cancel’ button or click any other form element to close the field settings sidebar.
The basic tab contains settings that the majority of WS Form users will need to control a field. The settings are as follows:
This label is used to identify the icons field in the WS Form form builder.
Use this setting to choose which repeatable section the icons will control. If you add an icons field to an existing repeatable section, it will automatically be assigned to that section.
The icons setting is used to choose which icons are shown in the field.
To add an icon:
- Click the ‘Add’ icon at the bottom right of the icons repeater.
- In the left column, select the icon type.
- In the right column, enter the ARIA label (accessibility).
- Repeat this process for each icon.
- Click the ‘Save’ button at the bottom of the sidebar to save your changes.
Accessible Rich Internet Applications (ARIA) defines ways to make web content and web applications more accessible to people with disabilities.
The ARIA label column enables you to define what text is made available to ARIA applications. This would, for example, provide a screen reader with specific text to read to someone with a disability.
The advanced tab contains additional form attribute settings that provide further control over how a field is rendered.
Use the ‘Styles’ settings to change the design of the custom button.
The vertical alignment setting allows you to choose how this field will be vertically aligned in relation to fields in the same row. The options are:
The horizontal alignment setting allows you to choose how the icons are horizontally aligned. The options are:
- Space Around (The space around each icon is the same)
- Space Between (The space between each icon is the same)
- Space Evenly (The space before, between and after each icon is the same)
Use this setting to choose which style of icon to display:
- Circle (Default)
- Circle – Solid
- Square – Solid
If ‘Custom’ is chosen, you can enter your own HTML for each icon. The ARIA Label is automatically wrapped around your HTML.
Enter the size in pixels of the icon (does not apply to text or custom icon styles).
Select the color to use if the icon is active.
Select the color to use if the icon is disabled. Icons are disabled when they cannot be used in a particular row, for example, the ‘Move Up’ icon is disabled in the first row.
For developers WS Form allows you to add your own classes to fields.
Wrapper CSS Classes
The wrapper CSS class setting enables you to add a class (or classes) to a field wrapper. Field wrappers are sections of HTML added around a field to position them on the page. To add multiple classes, add a space between the class names.
Field CSS Classes
To add a class to the actual field element itself, enter a class (or classes) to this setting. To add multiple classes, add a space between the class names.
Field restrictions enable you to define what can or cannot be entered into the field.
If checked the field will be disabled, and it cannot be interacted with. You can re-enable a field dynamically by using conditional logic.
This setting is used to add custom attributes to the HTML of this field, such as
data-my-attribute="1234". You can add as many custom attributes as you need..
To add a custom attributes key value pair:
- Click the ‘Add’ icon to add a custom attribute row.
- Enter the key in the left column.
- Enter the value in the right column.
- Click ‘Save’ to save the custom attributes.
The breakpoint settings define the width of a field and also what the offset (how many columns from the left-hand side of the form or the previous field) of a field is for each breakpoint. For more information about the breakpoint settings and capabilities of WS Form, click here.