Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Forms generation and validation

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mann.fr
Smarty n00b


Joined: 14 May 2003
Posts: 1

PostPosted: Wed May 14, 2003 2:07 pm    Post subject: Forms generation and validation Reply with quote

Hi,

I chose to use a template for my form
and a template for my page

is this a good idea ?

Here is what it looks like :

page.tpl "<HTML><BODY>FORM<BR/>{$the_form}</BODY></HTML>"

form.tpl "
{label for="a_feild"} : {input name="a_feild"} <BR/> {input name="a_select"}

page.php
require_once ("my_smarty_classe.php");
require_once ("my_forms_classe.php");
$my_smarty = new My_Smarty_Class();
...
$my_form = new My_Form_Class("form.tpl");
$my_form->AddInput(array(...));
$my_form->AddInput(array(...));
$my_form->LoadInputValues();
$my_form->Load();
// This loads the HTML source of the form of form.tpl
// in a global variable $the_form
$my_smarty->assign("the_form",$the_form);
$my_smarty->dislay();

I don't think using two Smartys is too smart !

And what do you think ?

Pls help ...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP