Using Hidden Fields in Formbuilder Template

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Using Hidden Fields in Formbuilder Template

Post by climberusa »

Hi,
I'm passing a variable from the calendar module to the formbuilder module like this:

Code: Select all

 {cms_module module='FormBuilder' form='register' value_classDate=$event.event_date_start}
Then I'm trying to take that value and use it in the formbuilder's submission templates. Is there a way to do this?

Jeff
Last edited by climberusa on Wed Jul 25, 2007 11:05 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Using Hidden Fields in Formbuilder Template

Post by calguy1000 »

well, the value_classDate isn't explicitly exported to smarty, but you can cheat
you could do something like this:

{assign var='value_classDate' value=$event.event_date_start}
{cms_module module='FormBuilder' form='register' value_classDate=$event.event_date_start}

Now the variable $value_classDate should be useable in smarty.  This is handy if $event isn't available.

{get_template_vars} can be used inside any template to show you what variables are available.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Re: Using Hidden Fields in Formbuilder Template

Post by climberusa »

thanks calguy. Also, sjg told me that in addition to  {cms_module module='FormBuilder' form='register' value_classDate=$event.event_date_start}, add a hidden field with the same name (classDate) fro within the formbuidler and you can access that variable. Works like a charm now.


Jeff
Last edited by climberusa on Fri Jul 27, 2007 3:02 am, edited 1 time in total.
Post Reply

Return to “CMSMS Core”