vishal vazkar
vishal vazkar

Reputation: 338

Submitting custom content - Umbraco Forms

I was thinking of buying umbraco forms but before that wanted to check whether one thing is possible and fairly easy to do.

As a part of my "Book Holiday Package" form, I want the user to see the (CurrentPage.PackageName) package name for which the user is booking the package for. I am struggling to do this as "CurrentPage" is not recognised in the forms section.

I want to be able to track the following fields :

  1. First Name - can be done using umbraco forms
  2. Last Name - can be done using umbraco forms
  3. Email Address - can be done using umbraco forms
  4. Which Holiday Package am I Enquiring for: "Needs to fetch the current package name". (probably displayed on the form as a label)

At the end of this form, the user should get an email with the package name for which he/she enquired about and the Admin should get an email for the package which has been requested by the user.

Is this possible to do using umbraco forms ? Or will I have to write some custom MVC and do it manually ?

Any help is much appreciated.

Thanks, Vishal

Upvotes: 0

Views: 215

Answers (1)

Tim
Tim

Reputation: 4257

You can add a hidden field, and then insert any page level variable into it using special syntax.

Lets assume that the current package name is a field on your page that the form is sat on, and has the alias "currentPackage". To include that field in the hidden field, edit the field, and in the default value field for your hidden field, add "[#currentPackage]". This should cause the field to save the name of the package.

You can create your own XSLT email templates in forms, and as long as you've saved the current package in the form, you can access it on those templates.

Upvotes: 2

Related Questions