Create and design forms

Overview

Before displaying a form on your pages with a widget, you must first create it, design its layout, and create its content. You do this in the Formsmodule.

Create the form

You create and configure forms on the Forms page.

  1. If you have multiple sites, use the dropdown menu in the upper left of the page to select the site where you want to create forms. 
    For more information, see Multisite.
  2. Navigate to Content » Forms.
    The Forms page opens.
  3. On the Forms page, click Create a form.
    The Create a form page opens.
  4. In the Title input field, enter the name of the form.
  5. You can change the automatically generated name for developers by clicking Change and entering the new name in the input field that appears.
    This is the name of the form that is used by developers to refer to the form in the code.
  6. In the Advanced section, under Web framework, select .NET Core only.
  7. To proceed to designing the form, click Create and go to add fields.
    You can save a blank form by clicking Create and return to forms.

Create the layout

You design the layout of a form in the same way that you design an ASP.NET Core page, you do this with the help of the Section widget.

To design the layout of the form, perform the following:

  1. Open an ASP.NET Core form for editing.
  2. In the page editor, click Add widget here…
    The widget selector opens.
  3. Click the Layout tab.
  4. Click the Section widget.

For more information, see Design the layout with the Section widget.

Create the content

After you have designed the layout of your form, using one or more Section widgets, you can proceed to add form widgets, such as textboxes, checkboxes, and submit buttons.

You first place the widgets on the page, afterwards, you configure them.

Place a widget in a form

You can place a form widget only inside a Section widget.
To do this, perform the following:

  1. Inside a column from the Section widget, click Add widget here…
  2. Select the Content tab.
  3. Click the respective widget.
    The widget is placed inside the selected column of the Section widget.

Configure a widget

To configure a widget, perform the following:

  1. In the page editor, hover over the widget.
  2. Click the toggle menu in the widget label.
  3. Click DotNetCore8 (Edit).

Configure each widget by following the respective procedure in this section.

This section contains

Textbox
Use this widget to give the user the opportunity to enter free text no longer than a line, such as street address, e-mail, etc.
Paragraph
Use this widget to give the user the opportunity to enter free text longer than one line, such as customer feedback.
Submit button
Use this widget to display the button that the user uses to submit the form.
Multiple choice
Use this widget to ask the user a question and give the user the opportunity to select only one of several predefined answers.
Checkboxes
Use this widget to ask the user a question and give the user the opportunity to select one or more of the predefined answers.
File upload
Use this widget to give the user the possibility to upload one or more file attachments to the form.
Content block
Use this widget to display instructions and explanatory text for the entire form or for a particular part of the form.
CAPTCHA
Use this widget to protect your website from spam and abuse. CAPTCHA is a test that users fill out before submitting a form.
Dropdown
Use this widget to ask the user a question and give the user the opportunity to select only one of many predefined answers. Use this widget, if the list of answers is long.
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.