Checkboxes

Overview

Use this widget to ask the user a question and give the user the opportunity to select one or more of the predefined answers. The Checkboxes widget is a checkbox group and the label of the group is the question that you want to ask.

After you have added the Checkboxes form widget in your form and opened its settings, the Checkboxes window appears, displaying the following sections:

Labels and content

In this section, perform the following:

  1. In Label or question input field, enter the label of the checkbox group.
    The label is a question, whose possible answers are given in predefined checkboxes. The user can select more than one of the checkboxes.
    For example, Which of the foods do you consume daily? or Daily consumption of foods
  2. In Choices fields, enter the possible answers to the question you have defined.
    By default, there are three input fields. If you need more or less choices, add and remove input fields by clicking Add (Add) and remove (Remove) of the respective field.
  3. In the LABEL column, in each input field, enter an answer (choice).
  4. Optionally, in the VALUE, assign a value to each answer.
    For example, if your question is What do you have for breakfast? and your answers are Eggs, Cereal, Granola, you can also assign numerical values to these answer that you can later sum faster.
  5. Optionally, in DEFAULT column, you can select one or more choice that will be selected by default when the form is displayed to the user.
  6. If you select Add "Other" as a last choice checkbox, the system adds another undefined checkbox.
    When the user selects that last checkbox, an input field is displayed, where the user enters another answer different from the predefined checkboxes.
  7. If you want to make the checkboxes mandatory, select the Required field checkbox
    A textbox appears, where you enter the error message that is displayed, if the user does not select anything.
  8. If you want this field to be visible in the form only when certain conditions are met, select Hide field initially checkbox.
    You can then use form ruled to display the field. For more information, see Form rules.

Display settings

In this section, perform the following:

  1. In Template dropdown, you can select a template other than the default one that will be used to display the checkboxes on the website.
    You must first have created a custom template.
    For more information, see ASP.NET Core pages and templates.
  2. In Layout dropdown box, you can select the number of columns that you want the choices to be displayed in.
    For example, if you have 20 possible answers, you may want to display them in three columns. Or, if you have 3 answer, you may want to display them side by side in one row.
  3. Save your changes.

Advanced widget settings

To open the advanced settings, in the upper-right corner of the Checkboxes widget page, click DotNetCore11 (Advanced settings).

Apply custom CSS

In CSS class input field, you can choose a class name for the checkboxes, if later you want to set a CSS style for this particular widget.

Developer name

You can change the automatically generated name for developers of these checkboxes by and entering the new name in the input field that appears.
This is the name of the field that is used by developers to refer to these checkboxes in the code.

Save your changes.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

File upload