FormBuilder values sent to 'Thank you' page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

FormBuilder values sent to 'Thank you' page

Post by fearmydesign »

Hi, I am trying to send the values collected on a FormBuilder form, but I can't get them to print to it. Here is my code on my 'Thank you' page:

Code: Select all

<h1 style="color: #3bb112;">Thank you {$fld_78}, your request has been received.</h1>
<h1>We will be in touch with you shortly!</h1>
<hr />
<h3>Contact Details</h3>
<p>
<strong>Name</strong>: {$fld_78}<br />
<strong>Email</strong>: {$fld_79}<br />
<strong>Phone number</strong>: {$fld_80}<br />
<strong>Zip code</strong>: {$fld_81}<br />
<strong>Message</strong>: {$fld_82}<br />
<strong>Products</strong>: {$fld_85}<br />
</p>
<hr />
<h4>Other information</h4>
<p>
<strong>Date of Submission</strong>: {$sub_date}<br />
<strong>Domain</strong>: {$sub_host}<br />
<strong>Your IP address</strong>: {$sub_source_ip}
</p> 
If I take this code and place it on the Submission Template, it works fine... but I want to customize the actual 'Thank you' page instead, shouldn't this work though?

I also tried just 'Creating the Sample HTML' on Submission Template, and copied the code over to my 'Thank you' page:

Code: Select all

<h2>Thanks! Your submissions have been received.</h2>{if $fld_78 != "" && $fld_78 != "[unspecified]" }<strong>Name</strong>: {$fld_78}<br />{/if}
{if $fld_79 != "" && $fld_79 != "[unspecified]" }<strong>Email</strong>: {$fld_79}<br />{/if}
{if $fld_80 != "" && $fld_80 != "[unspecified]" }<strong>Phone number</strong>: {$fld_80}<br />{/if}
{if $fld_81 != "" && $fld_81 != "[unspecified]" }<strong>Zip code</strong>: {$fld_81}<br />{/if}
{if $fld_82 != "" && $fld_82 != "[unspecified]" }<strong>Message</strong>: {$fld_82}<br />{/if}
{if $fld_85 != "" && $fld_85 != "[unspecified]" }<strong>Products</strong>: {$fld_85}<br />{/if}
But still does not work on the external cms page... :-\

Any suggestions? Thank you
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: FormBuilder values sent to 'Thank you' page

Post by Rolf »

Add in the top of your thank-you-page a module call assigned to a dummy string. With it the module is processed through Smarty and you can use the FB strings in the regular page.
Example {Formbuilder form='contact' assign='dump'}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: FormBuilder values sent to 'Thank you' page

Post by fearmydesign »

Rolf wrote:Add in the top of your thank-you-page a module call assigned to a dummy string. With it the module is processed through Smarty and you can use the FB strings in the regular page.
Example {Formbuilder form='contact' assign='dump'}
Thank you Rolf... I think I am doing something wrong. But I will keep playing with it to see if I can make it work.

Thanks again for your response.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: FormBuilder values sent to 'Thank you' page

Post by Rolf »

Uhm, I think you have to put the main content block itself also through Smarty to let it work...
See http://docs.cmsmadesimple.org/layout/ex ... e-template
Assign the {content} block to a string in the top of the template
And call the string in the body of the template.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”