Page 1 of 1

FormBuilder values sent to 'Thank you' page

Posted: Sat Oct 12, 2013 6:07 pm
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

Re: FormBuilder values sent to 'Thank you' page

Posted: Sat Oct 12, 2013 7:09 pm
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'}

Re: FormBuilder values sent to 'Thank you' page

Posted: Mon Oct 14, 2013 4:05 pm
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.

Re: FormBuilder values sent to 'Thank you' page

Posted: Mon Oct 14, 2013 5:05 pm
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.