![Picture of chris lejeune Picture of chris lejeune](/graphics/unknown.gif)
chris lejeune - 2006-12-04 17:06:30
Hi Manuel,
Thanks again for the excellent class.
My current setup is this:
contact.php, contact_form.tpl, contact.tpl
This is the two lines of code I have in contact.php, and other .php files.
$CallingFile = basename($_SERVER['SCRIPT_NAME'], ".php");
include('main_form_properties.inc');
$CallingFile is then the object name in 'main_form_properties.inc'.
Through some switches I assemble the form properties based on the calling script. I then output the form through Smarty. So one file ('main_form_properties.inc') contains all the properties for the modules forms.
I would like to have one form.tpl file and one .tpl that captures and outputs all the forms. Right now I have a different from.tpl file for each form; I would like to have only one form.tpl. So form.tpl will have an {input name="FormArray[]"}, or so.
A FormArray element will be a different depending on $CallingFile.
Can I do this with your class? If yes, how?
Thank You,
chris