База знаний конструктора сайтов Taptop

Styling a form and its fields

Содержание
Добавьте заголовки в ваш документ, чтобы сгенерировать содержание.

Styling a form

By default, a Form inherits the full width of its parent. You can customize the styles for a Form, including size, paddings, margins, element placement, and more. To do this, select a Form on the Canvas or the Layers tab and set the desired styles on the Design tab.

For example, you can arrange form fields horizontally. To do this:

Place the Form fields in a new Div block.

BlockNote image

Set the Flex in the Styles, horizontal direction, alignment, and gap.

BlockNote image

BlockNote image

Styling the Form elements

Also, you can style all Form elements individually. You can set styles for the entire group, for example, by setting paddings or margins. You can also style the label and the element field individually.

For example, you can change the font of the Form header and field labels, the size and placeholder for input fields, the color and size of a button, and so on.

BlockNote image

Styling Input Field

For Input fields, you can replace Field Labels with Placeholder . To do this:

You must hide the field labels (in the label element settings in the Display section) or remove the label element from the Canvas.

BlockNote image

Set Placeholder in the Input field settings.

Placeholder in the Input field settings

Placeholder in the Input field settings

Input field with Placeholder

Input field with Placeholder

Styling Checkboxes, Radio buttons, Select fields

By default, Checkboxes, Radio Buttons, and Select fields have custom styles, i.e. you can set styles for their elements.

In the Form settings, you can enable additional styles options - Apply standard browser styles to Checkbox and Radio Buttons and Apply standard browser styles to Select . In this case, these fields will have browser styles and it will be impossible to customize styles for their states.

BlockNote image

Styling Select Field

To style the text inside a select list, you need to apply styles to the Select layer.

BlockNote image

Select the Select layer either on the canvas or in the left panel, and configure the styles in the Design panel on the right, under the Text section. You can customize the font, weight, size, color, alignment, and casing (uppercase/lowercase) of the text in the field.

BlockNote image

In the Appearance section of the Design panel, you can style the background of the Select field:

To style the background of the selected option , use the Fill property.If no background is needed for the selected option, click the eye icon next to the color value to hide it.

To style the background of the dropdown list , use the Background color property.

BlockNote image

BlockNote image

If you set both Background color and hide the Fill , the same background color will apply to both the selected option and the dropdown list.

BlockNote image

BlockNote image

Dropdown styles can only be previewed in Preview mode or after publishing the project.

Related articles

Form and fields states
Form elements
Form