EPiServer Forms Archive

EPiServer Forms: JavaScript error – cannot read property ‘validate’ of undefined

I saw this JavaScript error earlier this week, and thought I’d write a few lines about it. It appears as you try to submit a form created with the EPiServer Forms functionality, that likely has custom validators on some of it’s fields. As EPiServer Forms tries to run it’s client side validation on the fields it gets presented with one requiring a custom validator; which …

EPiServer Forms: Adding custom client side validation to form field (Luhn algorithm)

When you’re developing custom EPiServer Forms field blocks you sometimes need to add your own custom validation as well. In this article you’ll see an example of how to add client side validation for the Luhn algorithm in a custom textfield block. This article assumes that you already have server side validation on your EPiServer Forms field; covered in article EPiServer Forms: Adding custom server …

EPiServer Forms: Adding custom server side validation to form fields (Luhn algorithm)

When you’re adding custom EPiServer Forms field blocks to your solution, you occasionally have the need for adding custom validation as well. Here is a sample of how to add a custom server side validation to your textfield block; you will probably also need client side validation for this, please see the article EPiServer Forms: Adding custom client side validation to form field (Luhn algorithm). …

EPiServer Forms: Forcing a field block to use a certain validator

There may arise situations where your custom EPiServer Forms field blocks make no sense without your custom validation code being applied as the website visitor submits the form. In these cases it may be useful to help the web editor by preventing the need to tick the correct validation checkbox in the form element block. Creds to my collegue Christer Bermar for his work on …

EPiServer Forms: Moving your EPiSever Forms views to another location

By default, EPiServer Form views goes in the directory /Views/Shared/ElementBlocks/, however if you’d like them placed elsewhere, this is easily done by adding a simple service configuration and extending EPiServer’s CustomViewLocationBase making an addition to it’s Paths array; see below. MyCustomViewLocationBase.cs Above code will allow you to keep views in a Forms directory in the Views/Shared folder.