Form widget

To display MVC forms on your pages, you use the Form widget. When you place the Form widget on a page that is in hybrid or pure MVC mode, you select which MVC form to display.

PREREQUISITES: You must have first created at least one MVC form.

Select an MVC form to display

  1. Open the Form widget designer.
  2. In the Form section, either select a form from the list or narrow down the list by starting to type in the Search field.
  3. Click Save.

Configure form settings

In the Settings section, you define custom actions that occur after a form is submitted.
If you opt to use custom confirmation, you are enabled to select one of the following options:

  • Show message for success
    A textbox appears, where you define the success message that appears when a user submits the form.
  • Redirect to a page...
    After submitting the form, the system redirects the user to another page of the website.
    Click Select and select a page from your website.

Configure advanced settings

In the Advanced settings section, you configure the individual properties of the widget. The model settings display all properties directly bound to the Form widget model. You can access these properties by clicking the Model button in Advanced settings mode.

  • AjaxSubmitUrl
    Gets and sets AJAX submit URL. Use only when UseAjaxSubmit is set to True.

  • CssClass
    Gets and sets an additional CSS class for the form wrapper element.

  • CustomConfirmationMessage
    Gets and sets custom confirmation message that would be displayed after successful submit of the form. Applicable only when CustomConfirmationMode is set to ShowMessageForSuccess.

  • CustomConfirmationMode
    Defines action after successful form submit:

    • ShowMessageForSuccess
    • RedirectToAPage
  • CustomConfirmationPageId
    Gets and sets ID of the page where the user will be redirected after successful submit of the form. Applicable only when CustomConfirmationMode is set to RedirectToAPage.

  • FormId
    Gets and sets ID of the form displayed in the widget.

  • UseAjaxSubmit
    Defines whether the form will be submitted with AJAX request.

  • UseCustomConfirmation
    Gets or sets whether to use custom confirmation action when the form is submitted successfully. If this setting is set to False, then the default settings of the form will be applied.

  • ViewMode
    Gets or sets the mode of the form:

    • Write
    • Read

Additional resources

Articles

 

 

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

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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.

Tags

Was this article helpful?

Next article

Image widget