Table of Contents

Class FormWidgetProperties

Namespace
Kentico.Forms.Web.Mvc.Widgets
Assembly
Kentico.Content.Web.Mvc.dll

Form widget properties

[FormCategory(Label = "{$kentico.formwidget.option.aftersubmit.headline$}", Order = 2)]
public class FormWidgetProperties : IWidgetProperties, IComponentProperties, IComponentProperties
Inheritance
object
FormWidgetProperties
Implements
Extension Methods

Constructors

FormWidgetProperties()

public FormWidgetProperties()

Properties

AfterSubmitDisplayText

The text to be displayed after a form submission.

[TextInputComponent(WatermarkText = "{$kentico.formwidget.aftersubmit.displaymessage.watermark$}", Order = 4)]
[VisibleIfEqualTo("AfterSubmitMode", "message")]
[RequiredValidationRule(ErrorMessage = "{$kentico.formwidget.aftersubmit.displaymessage.errormessage$}")]
public string AfterSubmitDisplayText { get; set; }

Property Value

string

Remarks

The text specified in this property is displayed when the AfterSubmitMode property value is set to DISPLAY_MESSAGE.

AfterSubmitMode

Specifies an action that occurs after a user submits a form on the live site.

[RadioGroupComponent(Options = "message;{$kentico.formwidget.option.afterformsubmit.displaymessage$}\r\nURL;{$kentico.formwidget.option.afterformsubmit.redirecttourl$}\r\nweb page;{$kentico.formwidget.option.afterformsubmit.redirecttopage$}", Inline = true, Order = 3)]
[RequiredValidationRule]
public string AfterSubmitMode { get; set; }

Property Value

string

Remarks

Use constants from the FormAfterSubmitModeConstants class.
For the Display message after submit use DISPLAY_MESSAGE mode. To set message text use AfterSubmitDisplayText property.
For the Redirect to specific URL use REDIRECT_TO_URL mode. Set URL by AfterSubmitRedirectToUrl property. For the Redirect to web page mode use REDIRECT_TO_WEBPAGE mode. To set page where user will be redirected use AfterSubmitRedirectToWebPage property. This option can be set only when the form widget is used on a page routed by the content-tree-based routing.

AfterSubmitRedirectToUrl

The URL to be redirected to after a form submission.

[TextInputComponent(WatermarkText = "{$kentico.formwidget.aftersubmit.redirecttourl.watermark$}", Order = 4)]
[VisibleIfEqualTo("AfterSubmitMode", "URL")]
[RequiredValidationRule(ErrorMessage = "{$kentico.formwidget.aftersubmit.redirecttourl.errormessage$}")]
[UrlValidationRule(AllowRelativeUrl = true)]
public string AfterSubmitRedirectToUrl { get; set; }

Property Value

string

Remarks

User is redirected to the specified URL when the AfterSubmitMode property value is set to REDIRECT_TO_URL.

AfterSubmitRedirectToWebPage

The web page to be redirected to after a form submission.

[WebPageSelectorComponent(ItemModifierType = typeof(WebPagesWithUrlWebPagePanelItemModifier), Order = 4)]
[VisibleIfEqualTo("AfterSubmitMode", "web page")]
[RequiredValidationRule(ErrorMessage = "{$kentico.formwidget.aftersubmit.redirecttopage.errormessage$}")]
public IEnumerable<WebPageRelatedItem> AfterSubmitRedirectToWebPage { get; set; }

Property Value

IEnumerable<WebPageRelatedItem>

Remarks

User is redirected on the selected web page when the AfterSubmitMode property value is set to REDIRECT_TO_WEBPAGE.

SelectedForm

Selected form code name.

[FormSelectorComponent(Label = "{$kentico.formbuilder.widget.selectform.label$}", Placeholder = "{$kentico.formbuilder.widget.selectform.placeholder$}", Order = 1)]
[RequiredValidationRule]
public IEnumerable<ObjectRelatedItem> SelectedForm { get; set; }

Property Value

IEnumerable<ObjectRelatedItem>