A form is defined through the structure
object, which includes its main properties.
This is the object that the host application passes to Beefree SDK, and it includes fields
, layout,
and attributes
along with a title
and a description
string values that you can use. The appearance of the form, in terms of styling of labels / fields / buttons (spacing, colors, etc…) is handled directly in the application and is saved in the design’s JSON file. Therefore, the same form can be used in different designs, and have message-specific styles.
To take a look at real-world examples and samples, you can head to our dedicated GitHub page.
Let’s now examine the anatomy of a Beefree SDK form structure.
This object contains the general form attributes as strings: all of them are standard HTML5 attributes.
An object that lists all the form fields included in the form with its relative properties. The order in which they appear only matters if you pass a single form to an application. If you want to use the content dialog to feed forms in the builder, the order is not relevant and you can set the form layout in the layout array.
Beefree SDK supports the vast majority of standard HTML5 form
fields. A few of them (such as color
, datetime
, datalist
) have mixed browser support, so please make sure to check browser compatibility before using them.
To see them in action, you can find a few examples on our dedicated GitHub page. Head over to allowed form fields if you need the full list of allowed field types, along with the available attributes and options for each of them.
If you want to use a single form, you can use the optional canBeRemovedFromLayout
and removeFromLayout
attributes to determine (respectively) if that specific field can be removed from the layout by the user, and if it should appear in the stage when the form is dragged in.
This attribute indicates that a field can be toggled off by the user. If unspecified, it will be applied as true, allowing the user to switch it on or off in the builder UI.
It’s a best practice to add canBeRemovedFromLayout: false
to mandatory fields (e.g., the email address field in a sign-up form) so that they can’t be excluded in the HTML form.
This attribute indicates that a field is toggled off by default when the form is loaded. This behavior is particularly useful to simplify the user experience when you implement forms in the builder through a default form in the configuration parameters.
If you want to leverage the full power of Beefree SDK forms and use a content dialog to feed the form to the editor’s stage, the layout
array will determine how the fields will appear to the user.
Each layout
element is an array itself and represents a single line of fields. This allows different layout dispositions, including multi-column.
Probably the best way to represent this is with an example:
The form title is a string value. It is not displayed to the user while working in the editor but provides extra information that can be used later for troubleshooting. Likewise, description as a string value that is not displayed to the user while working in the editor, but provides extra information that can be used later for troubleshooting or internal reference.
reCAPTCHA is a free service from Google that helps protect websites from spam and abuse. To learn more about reCAPTCHA, visit the official website or Google technical documentation site.
To embed Google ReCaptcha in a Form you need a Google API key for ReCaptcha, the key has to be enabled for a specific website URL or domain; this is crucial because otherwise the script will load but will fail its validation, returning API key errors.
Here’s what’s needed in the submit action when passing a form configuration:
In addition, you have to add an HTML block that imports the reCaptcha library inside the template that encapsulates the form:
Here’s a sample JSON config for the submit button:
Ensure you keep the following in mind:
Make sure HTML sanitize is OFF (this is the default value).
Remember that the reCaptcha UI elements will be visible neither in the Beefree SDK work area nor in the Preview, but they will be integrated when the page will be published. Furthermore, the page has to be hosted on the domain that was enabled on the Google Developers Console when setting the reCaptcha.
Property | Value |
---|---|
Attribute | Applies to | Type | Default value |
---|---|---|---|
Attribute | Applies to | Type | Default value |
---|---|---|---|
action
string
method
string
target
string
accept-charset
string
autocomplete
string
enctype
string
novalidate
boolean
dir
string
canBeRemovedFromLayout
all fields
boolean
true
removeFromLayout
all fields
boolean
false
This page provides a comprehensive list of HTML form field types, detailing their unique attributes and options, along with global attributes that apply to all fields.
The following global attributes are applicable across all field types. They define essential properties related to accessibility, content structure, behavior, and presentation. Reference the Global attributes and Attributes sub-sections of the HTML reference in mdn web docs to try out the attributes and learn more about their specifications.
List of Global Attributes and their corresponding explanations:
accesskey
: Defines a shortcut key to activate or focus an element.
class
: Assigns one or more class names to an element, used for styling and script interaction.
contenteditable
: Indicates whether the content of the element is editable.
dir
: Specifies the text direction (ltr
, rtl
, or auto
).
disabled
: Disables an element, making it not selectable.
readonly
: Prevents modification of the element’s content while still allowing interaction.
draggable
: Allows the element to be dragged.
hidden
: Hides the element.
id
: Assigns a unique identifier to an element.
name
: Specifies the name of the form control. Reference the mdn web docs on the name attribute to try it and learn more about its specifications.
itemid
: Provides a unique identifier for items when using microdata.
itemprop
: Specifies properties for microdata.
itemref
: References other items related to the current item for microdata.
itemscope
: Defines the scope of an item for microdata.
itemtype
: Defines the type of an item for microdata.
lang
: Declares the language of the element’s content.
tabindex
: Defines the tab order for focusable elements.
title
: Provides additional information about an element, often used as a tooltip.
value
: Specifies the value of the input element.
The following sections list the unique attributes for each field type. Reference the <input> types sub-section of the HTML Reference section of the mdn web docs to try out and learn more about unique attributes outlined in the subsequent sections.
Note: Global Attributes apply to each of the field types listed in the following sections.
The checkbox
field allows users to select multiple options from a list. It is often used to toggle between two states, like "checked" or "unchecked."
checked
(boolean): Specifies whether the checkbox is selected by default.
options
: An array of options, each with:
value
(string)
label
(string)
The color
field allows users to select a color from a color picker.
autocomplete
(string): Specifies if the browser should provide autocomplete suggestions.
list
(string): Refers to a <datalist>
that provides predefined color options.
required
(boolean): Specifies that the field must be filled before form submission.
The datalist
field provides a list of predefined options for other input fields, enhancing usability by offering suggestions.
No unique attributes.
options
: An array of options, each with:
value
(string)
The date
field allows users to select a date, displayed as a date picker.
autocomplete
(string): Specifies if the browser should suggest previously entered dates.
max
(string): Sets the maximum date allowed.
min
(string): Sets the minimum date allowed.
required
(boolean): Specifies that a date must be selected before submission.
step
(string): Specifies the granularity of selectable dates (e.g., steps in days).
The datetime-local
field allows users to input both a date and a time.
autocomplete
(string)
max
(string): Sets the maximum allowed date and time.
min
(string): Sets the minimum allowed date and time.
required
(boolean): Requires a date and time before form submission.
step
(string): Specifies the granularity of selectable times (e.g., steps in minutes).
The email
field is used for inputting one or more email addresses.
autocomplete
(string)
maxlength
(string): Specifies the maximum number of characters allowed.
minlength
(string): Specifies the minimum number of characters required.
multiple
(boolean): Allows multiple email addresses.
placeholder
(string): Displays a hint to the user.
required
(boolean): Requires an email address before form submission.
size
(string): Sets the visible width of the input.
The file
field allows users to upload one or more files from their device.
accept
(string): Specifies the types of files accepted by the server (e.g., image/png
).
capture
(string): Allows capturing images/audio from the camera/microphone if supported.
multiple
(boolean): Allows selecting multiple files.
required
(boolean): Specifies that at least one file must be uploaded.
The hidden
field stores data that the user cannot see or interact with but is submitted with the form.
autocomplete
(string)
The image
field creates a graphical submit button using an image.
alt
(string): Provides alternate text if the image cannot be displayed.
height
(string): Specifies the image URL.
src
(string): Defines the height of the image (in pixels).
width
(string): Defines the width of the image (in pixels).
The label
field associates a text label with a form control, improving accessibility.
No unique attributes.
The month
field allows users to select a month and year without choosing a specific day.
autocomplete
(string)
max
(string): Specifies the latest allowed month.
min
(string): Specifies the earliest allowed month.
required
(boolean): Ensures a selection is made before form submission.
step
(string): Defines the interval for month selection.
The number
field allows users to input numeric values.
autocomplete
(string)
max
(number): Sets the maximum allowed value.
min
(number): Sets the minimum allowed value.
required
(boolean): Requires a numeric value before submission.
step
(number): Specifies the allowed increment for numbers.
The password
field allows users to input masked text (e.g., passwords).
autocomplete
(string)
maxlength
(string): Limits the number of characters allowed.
minlength
(string): Sets the minimum number of characters required.
pattern
(string): Specifies a regular expression for validation.
placeholder
(string): Provides a hint to the user.
required
(boolean): Specifies that the field must be filled.
size
(string): Defines the visible width of the input.
The radio
field allows users to select one option from a group.
checked
(boolean): Indicates whether the radio button is selected by default.
required
(boolean): Specifies that one option must be selected before form submission.
options
: An array of options, each with:
value
(string)
label
(string)
The range
field allows users to select a numeric value within a range, often displayed as a slider.
autocomplete
(string)
max
(number): Sets the maximum allowed value.
min
(number): Sets the minimum allowed value.
step
(number):Defines the granularity of the range (e.g., steps in increments of 1 or 10).
The select
field creates a dropdown list that allows users to choose one or more options.
autocomplete
(string)
multiple
(boolean): Allows multiple selections if set to true.
required
(boolean): Specifies that the user must select at least one option.
size
(string): Defines the number of visible options in the dropdown.
options
: An array of options, either:
option
elements, with:
value
(string)
label
(string)
optgroup
elements, containing groups of options.
The search
field allows users to enter search queries with specialized input handling.
autocomplete
(string)
dirname
(string): Submits the text directionality of the search field with the form.
maxlength
(string): Limits the number of characters allowed in the input.
minlength
(string): Specifies the minimum number of characters.
placeholder
(string): Provides a hint about the expected input.
required
(boolean): Ensures that a search term is entered before submission.
The submit
field creates a button that submits the form data.
data-sitekey
(string): Used in conjunction with reCAPTCHA to verify form submissions.
data-callback
(string): Defines a JavaScript function to be executed after submission.
data-action
(string): Defines an action to be associated with the submit button.
width
(string): Defines the width of the submit button.
The tel
field allows users to enter telephone numbers.
autocomplete
(string)
maxlength
(string): Limits the number of characters allowed.
minlength
(string): Sets the minimum number of characters required.
pattern
(string): Provides a pattern for validation (e.g., for formatting telephone numbers).
placeholder
(string): Displays a hint about the expected input.
required
(boolean): Specifies that a telephone number must be entered before submission.
size
(string): Defines the visible width of the input.
The text
field allows users to input text.
autocomplete
(string)
maxlength
(string): Limits the number of characters allowed.
minlength
(string): Specifies the minimum number of characters.
pattern
(string): Provides a regular expression for validation.
placeholder
(string): Displays a hint for the expected input.
required
(boolean): Ensures that a value is entered before form submission.
size
(string): Specifies the visible width of the text input.
The textarea
field allows for multi-line text input, offering more space than the text
field.
autocomplete
(string)
cols
(number): Defines the visible width of the textarea in characters.
rows
(number): Defines the visible height of the textarea in lines.
maxlength
(string): Limits the number of characters allowed.
minlength
(string): Sets the minimum number of characters required.
placeholder
(string): Provides a hint about the expected input.
spellcheck
(string): Enables or disables spell checking.
wrap
(string): Controls text wrapping behavior (e.g., "hard"
or "soft"
).
required
(boolean): Specifies that input is mandatory before form submission.
The time
field allows users to input a time (hours, minutes, and optionally seconds).
autocomplete
(string)
max
(string): Sets the latest allowable time.
min
(string): Sets the earliest allowable time.
required
(boolean): Requires a time to be entered before form submission.
step
(string): Specifies the time granularity (e.g., steps in seconds).
The url
field is used for inputting valid URLs.
autocomplete
(string)
maxlength
(string): Sets the maximum number of characters allowed.
minlength
(string): Specifies the minimum number of characters required.
placeholder
(string): Provides a hint for the expected input.
required
(boolean): Ensures that a valid URL is entered before form submission.
The week
field allows users to select a specific week within a year.
autocomplete
(string)
max
(string): Specifies the latest week that can be selected.
min
(string): Specifies the earliest week that can be selected.
required
(boolean): Requires a week to be selected before form submission.
step
(string): Specifies the granularity of week selection.
You can load forms in the builder with two methods:
by passing in the configuration parameters a single, default JSON form, potentially including all the fields your application supports;
by implementing a content dialog and building a user interface on top of the builder, so that your users can browse and select forms.
If you successfully implement either method, you’ll see a new Form content tile in the builder Content tab.
Let’s see in detail how these methods work.
Use this method to provide a default form in the configuration parameters when the builder starts.
The default form will load when the user drags the form tile from the “Content” tab into the stage.
Here is an example of a typical login form:
The default form you pass to a Beefree SDK application may consist of a simple form (e.g., the most used one), or a longer form that the user can customize using the options in the form content properties, as pictured here:
The flexibility of these properties allows you to cover multiple form building capabilities, even when implementing just a default form. Let’s see how.
For higher flexibility and better user experience, the form can be customized with the optional canBeModified
, canBeRemovedFromLayout
, and removeFromLayout
attributes.
This attribute can be used to turn off the “Edit field” dialog for a field. If set to false, the configuration for that field will be locked to the one defined in the form JSON you passed to the application, except for the label.
If unspecified, it will be applied as true, allowing the user to edit the field using the builder UI.
This attribute indicates that a field can be toggled off by the user. If unspecified, it will be applied as true, allowing the user to switch it on or off in the builder UI.
It’s a best practice to add canBeRemovedFromLayout: false
to mandatory fields (e.g., the email address field in a sign-up form) so that they can’t be excluded in the HTML form.
This attribute indicates that a field is toggled off by default when the form is loaded. This behavior is quite useful to simplify the first experience when working with forms:
you can use a single form with all the possible fields, so there is no form selection step;
you can hide less common fields to load the most used combination at first, and keep the starting point simple, or even empty;
the user than can explore available fields with the form properites and build their custom form
When added, the form shows the minimum fields for submtting an email, e.g. for subscribing to a newsletter:
but then, the user can toggle on the available fields to transform it:
The Content Dialog feature is available on Beefree SDK paid plans only.
The content dialog allows you to build a user interface for selecting a form, on top of the builder. It can be a simple list with prebuilt forms, a search through categorized forms, a small form configurator or wizard, or even a complete form builder tailored for your application’s data.
For detailed information about this feature, please check the content dialog section.
The object that defines the form content dialog is the following:
As with most content dialog objects, the label is used within the interface to trigger the function:
The resolve object in the handler function must return a form using the structure and parameters described in this section.
The args object in the handler function returns to the host application the form object already applied. With this information, the application can decide what to display to the user (e.g., edit the current form, suggest a similar form, etc.).
An example of the content dialog object in beeConfig that handles special links and forms:
A reference of form fields that can be edited and that cannot be edited.
The following table provides an overview of the form fields that support the edit form field modal, including a description of each field and an example of its content.
Form Field Name | Description | Example Content |
---|---|---|
The following table provides an overview of the form fields that do not support the edit form field modal, including a description of each field and an example of its content.
Form Field Name | Description | Example Content |
---|---|---|
The Form block is available for the Page Builder and the Popup Builder
You can enable your users to add forms in Beefree SDK with two methods:
by passing in the configuration parameters a single, default JSON form, potentially including all the fields your application supports, and then have customers build and style forms with our form content block.
by implementing a content dialog on top of the form content block and building a user interface on top of the builder, so that your users can either browse and select pre-built forms or build a new form.
Note: For the "Form" tile to appear in the "Content" of the builder, you must successfully implement one of the two methods mentioned above.
Your application passes a single JSON form, potentially including all the fields that may be required in a form. You are in control of which fields are visibile when the form is dragged. From there, users have a vast control on how to customize the form, by:
adding or removing fields
rearranging their order
renaming their labels
editing their type
This is the quickest way to get started using forms. You may also decide to include such forms inside templates provided by your application.
The Content Dialog feature is available on Beefree SDK paid plans only.
If you want to pass more than one form to the builder, you can do so by implementing a Content dialog on top of the form content block.
With a content dialog, you have full control over the experience of adding a form. A few examples:
users can select a form from a predefined list
users can browse a list of forms and pick one
users can pick a form and have configuration options (e.g. define a layout) before adding it
Here is an example of form selection built with a Content Dialog.
Once the content dialog returns a form to the application, users can then change the form content properties in the builder, by adding and removing fields, rearranging their order. and customizing their labels and style
You may even want to go a step further and use the Content dialog to load your UI for form creation, on top of the builder; your users will be able to create a new form and add it to the web content they’re building, without interrupting their workflow.
The HTML Block is available on Beefree SDK paid plans only.
As an alternative to the above-mentioned methods, your users can add an HTML block and easily embed forms created with any form builder available on the market (e.g. Typeform, JotForm, etc.).
Form builders typically offer different options to get an embed code:
if the embed code is a script, it will not appear in the stage when building the web content. Due to security reasons, we need to remove such scripts during edit mode. The form will appear regularly both in the preview and in the final HTML output. An example of this behavior is the embed code produced by Typeform;
If the embed code lives in an iframe, it will be visible during editing as well. For example, Jotform and Google Forms offer this kind of embedding option.
Once a form is added to the web content, the user has these options to manage fields:
Add and remove fields (unless they are marked as required)
Rearrange their order
Rename their labels
Besides, end users can edit fields, when the “edit” action is available.
Finally, users can apply various styling options to the form:
change font type, size, and style;
change colors for text and input backgrounds
change size for field inputs
define borders and paddings
position field labels on the top or on the side of the input fields
style buttons
and more . . .
When managing fields in a form block, users can click on the “Edit” action to change field types and properties. To facilitate the user, the icon next to the label highlights the current field type.
A modal window will pop up:
From this modal, users can:
change field type
change general field properties
label (available also in the sidebar)
placeholder (not available for date, multiple/single choice, dropdown)
required field
read-only field
Clicking on “Type” will open a dropdown with all the available field types:
All fields can be edited, unless:
you defined the field in the JSON form as not editable, using the canBeModified
attribute
the field type is
Submit
Hidden
File upload
Label (a special field type with plain text)
Now, let’s have a closer look at the field types that can be configured with the “Edit field” modal.
Email / Phone / Text / Url
These are the easiest field types to configure, as they only have the optional Placeholder property.
The email and URL types will check at form submission, through HTML5 validation, that the value entered is a formally correct email/web address.
Single choice / Multiple choice / Dropdown
Users need to enter the values that will be displayed to visitors. To do this, they will add those values under Options:
They can either:
Enter a single value, which will be both the label and the value passed to the host app in the form.
Enter couplets such as label | value to differentiate the label shown to visitors from the value passed to your app after form submission. In the example above, users will select Milan from the dropdown at the city they want to visit, but your app will receive “A” as the response for that field.
The Multiple choice type can also be used to create checkboxes, e.g. privacy policy acceptance. In this case, no value should be specified, and any external URL should be added in the field label, like in this example:
Date
This type has no additional properties. The date format of the value returned to the host app will be coherent with browser locale information.
Visitors will enter the date using the browser’s date picker. Otherwise, they can input the date directly, following the automatically generated placeholder for the expected date format.
Number
This type has the option to enter a minimum and/or a maximum allowed value. If not entered, the field will accept any number.
Number fields have a “spinner” input that visitors can use to cycle through allowed values. Visitors can also input a number directly, but the HTML 5 validation will verify if the submitted number falls into the permitted interval.
Long text
This type is just like a text field, but it’s meant for longer inputs. It has an additional “row height” property to define the default height for the text area – which can be adjusted by the visitor by dragging the bottom right corner. Here is how a long text field looks like in a form:
Beefree SDK just passes the data back to the host application. It doesn’t save anything or touch any of the data.
You can implement client-side validation in your JSON forms using the built-in HTML5 form validation, to validate things like:
required field;
response length, for strings (“must be less than” or “must be higher than” n characters);
response value for numbers (minimum or maximum value allowed);
correct type (i.e. the field must contain a number, email address, or some other specific preset type);
check against a regular expression that defines a pattern the entered data needs to follow.
Any other post-submission validation and action must be defined and performed by your application, for instance:
validating whether the data is acceptable, i.e. email already registered;
saving it into a database;
passing it to a 3rd application;
performing other actions (e.g. sending an email notification).
Learn how to implement the different methods to pass forms to the Builder
A closer look at how to structure a JSON form
Visit our GitHub account to:
dive into some sample forms and quick start your integration;
download templates that include those forms;
get a validation JSON schema to test your forms with.
Explore how to implement customization options for a form's layout.
This feature is available on all Beefree SDK plan types and applies only to Page and Popup builders.
This document outlines how you can customize a form’s layout, and discusses the available layout customization options. These options allow you to adjust various elements of forms to improve your end's user experience creating them. Form layout options ensure your application's end users have more tools to create a more effective presentation of their forms.
Key form layout customization options include:
Multiple choice and radio button orientation: You can adjust the orientation of multiple choice and radio button elements, choosing between horizontal or vertical alignment to suit your design preferences or space constraints.
New layout presets: Three layout presets are available: horizontal, vertical, and grid. These presets define the overall structure of the form, allowing you to easily apply a consistent layout across fields.
The form field width includes the following customization option:
Form field width property: A new boolean property, fullWidth
, enables you to manage form field widths. When set to true
, the field will expand to 100% width. When set to false
, it the field width is set to 50%.
The following video provides a visual representation of these customization options and how they function within the user interface.
Prior to getting started, ensure you have the following:
Page builder or Popup builder application within your Dev Console
For this implementation, there is a field called orientation
in the JSON at the field object level. This field controls the layout orientation for multiple-choice and single-choice fields, which include radio buttons and checkboxes. The orientation
field accepts the following two values:
horizontal
vertical
Default behavior: If the orientation
field is not included in the JSON, the form will default to horizontal orientation both on the backend and the frontend.
The following JSON display an example of the updated structure for a radio button field with the orientation
field included:
Take the following steps to configure the orientation
field:
Locate the form field object in the JSON: Find the field you want to configure, such as a radio button or checkbox field. This will be under the "fields"
key within the JSON structure.
Add the orientation
property: Inside the field object, add a new property called orientation
.
Set the value: Assign the orientation
field a value of either "horizontal"
or "vertical"
, depending on how you want the options displayed in the form.
Save the changes: After making the necessary updates to the JSON structure, ensure that the changes are saved.
Test the form: Once the JSON is updated, test the form to ensure that the options are displayed in the correct orientation. If the field is missing, check if the default horizontal orientation is applied.
These steps will allow you to effectively control the layout orientation of multiple-choice fields in your forms.
The layout of the form fields can be controlled using a new layoutPreset
field. This field is located in the structure
object of the JSON and supports three possible values:
vertical
horizontal
grid
Note: If the layoutPreset
is not defined in the JSON file, the Form will use a horizontal layout structure.
JSON Structure Example
Here is an example of a form JSON structure utilizing layout presets:
The following list shows the available options for layout presets.
Vertical: Fields will be stacked vertically, one on top of another.
Horizontal: Fields will be aligned horizontally, side by side.
Grid: Fields will be organized into a grid layout, allowing for more complex positioning.
Take the following steps to configure the layoutPreset
field:
Locate the structure
object in the JSON: Find the structure
key within the form’s JSON definition where the fields and layout are defined.
Add or modify the layoutPreset
field: Inside the structure
object, add a new property called layoutPreset
.
Set the desired value: Assign the layoutPreset
field one of the following values to control the layout of the form:
"vertical"
: Stack fields vertically.
"horizontal"
: Align fields horizontally.
"grid"
: Organize fields in a grid format.
Example:
Configure field properties (if applicable): If you are using the grid
layout, you may also need to adjust other field properties like fullWidth
to control the width of individual fields. For example, set "fullWidth": true
to make a field span the full width of the grid column.
Save and test the form: After setting the layoutPreset
, save the updated JSON structure and test the form layout to ensure the fields are displayed according to the selected preset.
By following these steps, you can easily configure and control the layout of your form fields using the new layoutPreset
field.
fullWidth
FieldA new boolean field, fullWidth
, has been introduced within each form field object. This field is applicable only when the layout preset is set to grid
. If a layout other than grid
is used, the fullWidth
field will be ignored or removed from the JSON structure.
In a grid layout, setting fullWidth
to true
will cause the form field to span the entire width of the grid column, while setting it to false
will restrict the field's width to a smaller portion of the grid.
fullWidth
Field in JSONTake the following steps to configure the fullWidth
field:
Ensure the layout preset is set to grid
: The fullWidth
field only functions when the form’s layout preset is set to "grid"
. Verify that the "layoutPreset"
field in the JSON is set to "grid"
.
Locate the desired form field: In the JSON structure, find the field you want to configure, such as an email or text field.
Add the fullWidth
field: Inside the form field object, add a new property called fullWidth
.
Set the boolean value:
Set fullWidth
to true
to make the form field span the entire width of the grid column.
Set fullWidth
to false
if you want the form field to occupy half or a portion of the grid column.
Example:
Save the changes: After adding or modifying the fullWidth
field, save the updated JSON structure.
Test the form in grid layout: Ensure that the form’s layout is set to grid
and that the field's width behaves as expected.
By following these steps, you can effectively configure the fullWidth
property to control the width of form fields in grid layouts.
Layout Widget: End users can change the layout preset using a layout widget available in the form sidebar.
Field Width Widget: When the form is using the grid
preset, the fullWidth
field can be modified by users through a field width widget available in the Manage Fields section or the Edit Form Modal.
The Submit field will always have fullWidth
set to true
, and the corresponding widget will be disabled to ensure it spans the full width. For more details on the end user experience, reference the Form Layout Customization end user documentation.
Attribute | Applies to | Type | Default value |
---|---|---|---|
Attribute | Applies to | Type | Default value |
---|---|---|---|
Attribute | Applies to | Type | Default value |
---|---|---|---|
canBeModified
all fields except file
, hidden
, label
, and submit
,
since they cannot be edited
boolean
true
canBeRemovedFromLayout
all fields
boolean
true
removeFromLayout
all fields
boolean
false
Checkbox
Allows the user to select one or more options.
"Subscribe to newsletter"
Color
Allows the user to select a color from a palette.
"#ff5733"
Date
Allows the user to input a date.
"2024-09-21"
Allows the user to input an email address.
"example@email.com"
Number
Allows the user to input a numerical value.
"42"
Radio
Allows the user to select one option from a set.
"Option 1"
Select
Provides a dropdown menu for the user to choose from.
"Choice A"
Tel
Allows the user to input a phone number.
"(555) 123-4567"
Text
Allows the user to input a single line of text.
"John Doe"
Textarea
Allows the user to input multiple lines of text.
"This is a message..."
URL
Allows the user to input a web address.
"https://example.com"
Submit
Creates a button that submits the form.
"Submit"
Datalist
Provides a list of predefined options for an input field.
"Option 1, Option 2"
Datetime
Allows the user to input both a date and time.
"2024-09-21T14:30"
File
Allows the user to upload a file.
"Upload a document"
Hidden
Stores hidden data that the user does not see.
"userID=12345"
Image
Displays an image as a form button.
"Submit (image icon)"
Label
Defines a label for an input element.
"Username"
Month
Allows the user to input a month and year.
"2024-09"
Password
Allows the user to input a password.
"********"
Range
Allows the user to input a value within a range.
"50 (from 0 to 100)"
Search
Allows the user to input search text.
"Search query"
Time
Allows the user to input a time.
"14:30"
Week
Allows the user to input a week and year.
"2024-W38"