Developer forum

Forum » CMS - Standard features » Form confirmation

Form confirmation

Thomas Schroll
Reply

Hi

I'm trying to place a text in a form confirmation. I present the user for the submitted data and I do not use a confirmation page. I wish to use a single template and a single form on multiple pages, where the confirmation text depend on the page where the form is placed. I have tried to make a page item and insert it in a hidden field, but I can't pass the data to the module template.

Does anybody know how to do that, or does anybody know a better way to accomplish it.

Regards Thomas


Replies

 
Lars Britz
Reply

Hi Thomas,

I assume that you are using Forms (for datalists) and have made your own confirmation-template

Why not use simple If-statements? For instance:
 

<!--@If(DwPageID=[your page ID])-->
    Bla bla
<!--@Else-->
    Bla bla 2
<!--@EndIf-->

 
Morten Bengtson
Reply

I'm not sure I understand what you are trying to do, but if you just need to move some output on the page into a module template on the same page, then you can use snippets to accomplish that...

http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Snippet.aspx

 
Morten Bengtson
Reply

I'm not sure I understand what you are trying to do, but if you just need to move some output on the page into a module template on the same page, then you can use snippets to accomplish that...

http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Snippet.aspx

 
Thomas Schroll
Reply

Thanks guys

Lars: I prefer to avoid hardcoding pageid's.

Sorry, I wasn't specific enough. I need to change the text in the email receipt.

What I've done is made a snippet on the page where the form is located. Inserted the snippet data in a text field and hidden it with css (it was to much work to extract the data from the hidden field). I then use it in the "thank you" text of the email receipt template and remove it from the fields loop in the receipt.

It isn't pretty but it works.

Regards Thomas

 

You must be logged in to post in the forum