Login   Register  
PHP Classes
elePHPant
Icontem

File: public/index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Frank Broersen  >  Form creater  >  public/index.php  >  Download  
File: public/index.php
Role: Example script
Content type: text/plain
Description: The index page
Class: Form creater
Generate forms for using with Smarty templates
Author: By
Last change:
Date: 2008-03-20 00:44
Size: 760 bytes
 

Contents

Class file image Download
<?php
/**
 * Controller class
 *
 * @author Frank BRoersen
 * @version 0.1
 * @copyright 2008
 */
require_once('../inc/main.inc.php');
$oSmarty = new SmartyWrapper;
$aForm['start'] = Form::start('form.html','post','form');
$aForm['username'] = Form::textfield('username','frank');
$aOptions = array('1'=>'Number 1','2'=>'Number 2','3'=>'Number 3 is selected','4'=>'Number 4');
$sSelected '3';
$aForm['select'] = Form::select('select',$aOptions,true,$sSelected);
$aForm['radio'] = Form::radio('radio',$aOptions,$sSelected);
$aForm['reset'] = Form::button('reset','reset','reset');
$aForm['submit'] = Form::button('submit','submit','send!');
$aForm['stop'] = Form::stop();
$oSmarty->assign('Form',$aForm);
$oSmarty->display('form.tpl');
?>