Best or Recommended method to pass data to a Form?

Vote:
 

Im looking to create a setup where a user views some program information, and after clicking a "request more info" button, it sends them (and some info on where they came from) to a contact page. Is this possible using the out of box Forms? Or is this something better created from scratch? Any ideas would be appreciated! 

#188351
Feb 20, 2018 16:27
Vote:
 

The Forms module doesn't have a built-in way of passing/receiving data like this (other than by custom code).

Off the top of my head, an out-of-the-box method (somewhat cumbersome, but still) could be by using a combination of Visitor Groups and the Hidden Profiling form field type.

You could create a Visitor Group that captures which page (or category) the visitor was on before going to the contact page.

In your form, you can use the Hidden Profiling form field type to retrieve which Visitor Group the visitor was in (and hence, which page they came from).

This probably isn't a very manageable solution in the long run (considering you may have many pages that send visitors to the contact page).

Best or recommended method - definitely not ;-)

#188365
Edited, Feb 21, 2018 10:55
Vote:
 

Another approach 

  1. Create a custom Form field that can obtain all the information (JSON) you have been collecting (maybe from cookie)
  2. Use it with your EpiServer Forms

Regards
/K

#188389
Feb 21, 2018 17:11
Vote:
 

Thanks for the suggestions! Im going with overriding the hidden form field so it can grab necesary data. Just working through an anti-forgery token issue at the moment. 

#188456
Feb 23, 2018 18:24
* 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.