PHP Classes

File: exemplo.php

Recommend this page to a friend!
  Classes of Otavio Theiss   Generic Form class   exemplo.php   Download  
File: exemplo.php
Role: Example script
Content type: text/plain
Description: Simples exemplo de utilização
Class: Generic Form class
Generate Web forms programatically
Author: By
Last change:
Date: 15 years ago
Size: 1,233 bytes
 

Contents

Class file image Download
<?
require("gen.form.class.php");

$a = new GEN_FORM();
$a->setOpenForm();
echo
"\n<br>";

$a->fldName = "teste";
$a->fldId = "teste";
$a->fldType = "textarea";
$a->cssStyle ="color:red;";
$a->fldValue= "foi";
$a->getField();
/**echo "<br>";
$minha_classe = new GEN_FORM();
$variaveis = get_class_vars(get_class($minha_classe));

foreach ($variaveis as $nome => $value) {
   echo '$this->'.$nome.'= "";<br>';
}*/
echo "\n<br>";
$a->fldName = "teste1";
$a->fldId = "teste1";
$a->fldType = "text";
$a->cssStyle ="color:blue;";
$a->fldValue= "foi2";
$a->fldReadOnly = 0;
$a->fldDisabled = 0;
$a->getField();

echo
"\n<br>";
$a->fldName = "teste3";
$a->fldId = "teste3";
$a->fldType = "password";
$a->cssStyle ="color:#ccc;";
$a->fldValue= "foi";
$a->fldReadOnly = 0;
$a->getField();

echo
"\n<br>";
$a->fldName = "teste4";
$a->fldId = "teste4";
$a->fldType = "textarea";
$a->cssStyle ="color:red;";
$a->cssClass = "class123";
$a->fldValue= "foi";
$a->getField();
echo
"\n<br>";

$a->fldName = "btn";
$a->fldId = "btn";
$a->fldType = "submit";
$a->cssStyle ="color:red;";
$a->fldValue= "manda";
$a->getField();
echo
"\n<br>";



echo
"\n\n";
$a->setCloseForm();

?>