Page 1 of 1

Using Hidden Fields in Formbuilder Template

Posted: Wed Jul 25, 2007 11:03 pm
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

Re: Using Hidden Fields in Formbuilder Template

Posted: Thu Jul 26, 2007 8:08 pm
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.

Re: Using Hidden Fields in Formbuilder Template

Posted: Fri Jul 27, 2007 12:00 am
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