PHP Classes

Form creator

Recommend this page to a friend!

      Form creator  >  All threads  >  Form creator  >  (Un) Subscribe thread alerts  
Subject:Form creator
Summary:How to
Author:Ferrand Gérard
Date:2012-10-21 10:21:09
Update:2012-10-22 17:06:24

  1. Form creator   Reply   Report abuse  
Ferrand Gérard - 2012-10-21 10:21:09
Could you provide some explanation of the use of this class.

P.S. Excuse my bad english, is not my language.

  2. Re: Form creator   Reply   Report abuse  
catalin - 2012-10-22 08:04:12 - In reply to message 1 from Ferrand Gérard
In form.php file, in comment part of file, is an example of how to use this classes. But i will try here to show few things:
-first you need to load classes or use autoload function;

//initialise a new form
$form=new form();
//add attributes to form
//add tag to form - default is table, so if you want to put your form in a //table don't need to add tags
//ATTENTION: if you change tags you MUST change all tags from elements and //labels.
//add first text element
//add label for this element
$name->addLabel('Your name: ');
//add tag for label (default is td, if you change table MUST change
//add attributes for element
$name->placeholder('Your name');
//add content tag for element togeter with label
//print form

Something like this. If you have more questions I am here.

  3. Re: Form creator   Reply   Report abuse  
Ferrand Gérard - 2012-10-22 17:06:24 - In reply to message 2 from catalin
Thank you for your answer. It works.
In this kind of exercise, I think it is always best to provide a working example for a better understanding of all.