The ASP.NET Core Form widget enables you to display ASP.NET Core forms on your website.
PREREQUISITES: You must have first created at least one ASP.NET Core form. For more information, see Create and design forms.
Place the widget on the page
You can place a Form widget only inside a Section widget.
To do this, perform the following:
- Inside a column from the Section widget, click Add widget here…
- Select the Content tab.
- Click the FORM widget.
The widget is placed inside the selected column of the Section widget.
To open the widget settings, perform the following:
- In the page editor, hover over the widget.
- Click the toggle menu in the widget label.
- Click (Edit).
The Form page opens.
In the Select pages section you can do the following:
Select the form to display
To do this, under Select a form, click (Select form) and select a form from you’re the Forms module.
The form must be a ASP.NET Core form.
Choose what to do after the user submits the form
After the user clicks the Submit button, you can choose one of the following actions:
- As set in the form
The user will be redirected or a message will be displayed, depending on what you have configured for this form in the Forms module.
For more information, see Configure the form properties.
- Custom message
A textbox appears, where you define the success message that appears when a user submits the form.
- Custom redirect to a page
After submitting the form the system redirects the user to another page of the website.
Click (Select page) and select a page from your website.
Configure the widget margins
In Display settings, under Margins, you can choose the margins between the text and the column where it is placed.
Choose from the predefined values of none, small, medium, or large.
Save your changes.
Advanced widget settings
To open the advanced settings, in the upper-right corner of the Form widget page, click (Advanced settings).
- In Label, you can enter a specific name for this widget.
This name will be displayed in:
- The page editor as a label for the widget
- In the treeview with the page structure in the right pane of the page editor.
- In CSS class, you can enter individual CSS class for the Form widget.
- Save your changes.