Extending #Episerver.forms with URL QueryString/post Value Element

How to extend Episerver Forms with a hidden QueryString/HttpPost Value Element.

Published 22nd of May 2017
For Episerver Version 10 and Forms > 4.4

Security warning! Be aware of how you use url parameters. This may be a security risk. Use at own risk or not at all.

Had a case where I needed to save a PageId into a form, similar to an order functionality.

You need an Element model:

And the view (which is a copy of built in PredefinedHiddenElementBlock.ascx)

Save your view under views/shared/elementblocks/

When using the element, just fill in the “Predefined value” with the key used by Querystring or form post.

It pops up in the form elements pane:

And in onpage edit:

In email placeholder you’ll find #OrderId#:

Use it wizely with httpGet or HttpPost

More reading

SEO terms:

  • Hidden post value in element of Episerver Form
  • How to extend episerver forms with querystring value
Like it? please up vote
0