Try our conversational search powered by Generative AI!

EPiServer Forms: Composite Address field possible?



I've just started with looking into EPiServer Forms to see if it matches our requirements for creating forms.

Many of our forms have an "address" part (Streetname, housenumer, zipcode). For this i would like to create one reusable "address" block/element in EPiServer Forms.

Is this possible? I'm getting the impression this is not the-way-to-go. 

The reason i want to create this as a composite is that the seperate parts of an address are related. Also address-resolvement will need to take place using the values of all the parts of the address.

Any response would very much be appreciated.

Sander Schutten

Feb 22, 2016 12:11

The neat way is like you are thinking about. Custom element that inherits from block types and extends with some custom validation. There are some blogs about custom elements that you can check out. Easier dirty way is probably using existing elements but use name conventions combined with a handler for a submitting form step. Check out blog

For a simple example of Google maps element as well as code for registrating events by using initializable module.

Feb 22, 2016 19:18

Hi @Sander

From your point, I guess that validating visitor address (as a whole) is  your most concern?

  • I don't have the link onhand, but I saw a jQuery Plugin that validate address as a composite element.
  • You can design a custom Form element with several parts of address (in several textboxes) and validate them on client side.
  • You can even use Google Map API to validate the address (as a whole) on client side or server side.
  • An inline map can be place next to the composite address element.

This can be good example as a Sample of FormElement. Thank you.

Thach Lockevn.

Feb 26, 2016 7:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.