PHP Classes

Multi-page form

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Multi-page form  >  (Un) Subscribe thread alerts  
Subject:Multi-page form
Summary:Consolidate inputs for all subforms into one template
Messages:2
Author:Form Class
Date:2007-05-05 09:43:54
Update:2007-05-05 21:39:54
 

  1. Multi-page form   Reply   Report abuse  
Picture of Form Class Form Class - 2007-05-05 09:43:54
Hi All,

1. I've noticed if forms class and its prefilters/functions are not included, Smarty gives an error on encountering {input} tags in templates.

2. My question is - if I include inputs that do not belong to the current subform, like so:

{if $subform == 'one'}
{input name="id"}
{input name="name"}
{elseif $subform = 'two'}
{input name="email"}
{input name="phone"}
{/if}

will the above have any performance issues from the forms class' perspective or Smarty's perspective? Do the forms class/Smarty really skip processing/rendering the inputs that do not belong to the $subform? Or, is it better to use multiple templates - one for each subform? Please see point 1 above in this regard.

TIA

  2. Re: Multi-page form   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-05-05 21:39:54 - In reply to message 1 from Form Class
The Smarty pre-filter scripts are in the plugins directory.

As for the performance question, there is really not much difference with single or separate templates. Separate templates may be simpler to design and maintain as you define what you see in each page with distinct templates.