PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > Forms processing with Smarty
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Forms processing with Smarty

Réponse
 
LinkBack Outils de la discussion
Vieux 10/02/2006, 12h51   #1
Davi Leal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Forms processing with Smarty

Hi all,

I have developed a custom template 'engine' to our website. Now, I want to
migrate to the Smarty engine. I have read some documentation at your
website, however I do not yet know how could I deal with forms processing
with smarty. Below you can see an example.

Using my custom template, I have to phases:

First: Process all forms

Second & Last: Displaying the output result


Could you point me in the right way to convert the below example to Smarty?..
Any advice?. Maybe an URI to read?.

Regards,
Davi


--
require_once "WebPage.php";

require_once "Person_form.php";
$personForm = new PersonForm();

$webPage = new WebPage($personForm);
$webPage->processPage();
$webPage->printPage();

  Réponse avec citation
Vieux 10/02/2006, 13h11   #2
Manuel Lemos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Forms processing with Smarty

Hello,

on 02/10/2006 10:51 AM Davi Leal said the following:
> Hi all,
>
> I have developed a custom template 'engine' to our website. Now, I want to
> migrate to the Smarty engine. I have read some documentation at your
> website, however I do not yet know how could I deal with forms processing
> with smarty. Below you can see an example.
>
> Using my custom template, I have to phases:
>
> First: Process all forms
>
> Second & Last: Displaying the output result
>
>
> Could you point me in the right way to convert the below example to

Smarty?.
> Any advice?. Maybe an URI to read?.


You may want to take a look at this forms generation and validation
class. It comes with a Smarty plug-in so you can define your form
templates with Smarty.

http://www.phpclasses.org/formsgeneration


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
  Réponse avec citation
Vieux 10/02/2006, 13h28   #3
Alain Williams
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: Forms processing with Smarty

On Fri, Feb 10, 2006 at 11:11:06AM -0200, Manuel Lemos wrote:
> Hello,
>
> on 02/10/2006 10:51 AM Davi Leal said the following:
> > Hi all,
> >
> > I have developed a custom template 'engine' to our website. Now, I want to
> > migrate to the Smarty engine. I have read some documentation at your
> > website, however I do not yet know how could I deal with forms processing
> > with smarty. Below you can see an example.
> >
> > Using my custom template, I have to phases:
> >
> > First: Process all forms
> >
> > Second & Last: Displaying the output result
> >
> >
> > Could you point me in the right way to convert the below example to

> Smarty?.
> > Any advice?. Maybe an URI to read?.

>
> You may want to take a look at this forms generation and validation
> class. It comes with a Smarty plug-in so you can define your form
> templates with Smarty.
>
> http://www.phpclasses.org/formsgeneration


I now use quickform to generate/validate forms. It works well and
works with smarty. I have a quick demo page:

http://www.phcomp.co.uk/TechTutorial/QfSmarty/index.php

--
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/

#include <std_disclaimer.h>
  Réponse avec citation
Vieux 10/02/2006, 15h16   #4
Jochem Maas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Forms processing with Smarty

Davi Leal wrote:
> Hi all,
>
> I have developed a custom template 'engine' to our website. Now, I want to
> migrate to the Smarty engine. I have read some documentation at your
> website, however I do not yet know how could I deal with forms processing
> with smarty. Below you can see an example.
>
> Using my custom template, I have to phases:
>
> First: Process all forms
>
> Second & Last: Displaying the output result
>
>
> Could you point me in the right way to convert the below example to Smarty?.
> Any advice?. Maybe an URI to read?.
>
> Regards,
> Davi
>
>
> --
> require_once "WebPage.php";
>
> require_once "Person_form.php";
> $personForm = new PersonForm();
>
> $webPage = new WebPage($personForm);


the WebPage class seems to be a good candidate for making
it a Smarty subclass.

> $webPage->processPage();
> $webPage->printPage();


if you made WebPage a subclass of Smarty you would
probably need to rewrite the printPage() method
to assign data to Smarty and output a template and add a
std interface (if your using php5 you could really use an interface here!)
to any object that might be passed into
the WebPage constructor so that you can have the passed
object assign any custom data it needs to 'the template'
(i.e. to the Smarty object) and tell the WebPage object which [content]
template needs to displayed.

make sense?

>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h59.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15813 seconds with 12 queries