File: css-form_generator-example.php

Recommend this page to a friend!
  Classes of Darren Cline  >  Basic CSS Form Generator  >  css-form_generator-example.php  >  Download  
File: css-form_generator-example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Basic CSS Form Generator
Compose and generate HTML Forms with valid CSS
Author: By
Last change: had to switch method to lowercase, uppercase causes file to not validate, thanks mpabeelen at hotmail dot com for pointing that out.
Date: 16 years ago
Size: 1,676 bytes



Class file image Download
<? require 'form_generator.class'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>XHTML/CSS Form Generator Basic Example</title>
    <link type="text/css" rel="stylesheet" href="form.css" media="screen" />
    <style type="text/css">
    /* We use CSS in order to change the apperance of our fields by referrencing thier ID */
    form textarea#comments { width: 25em; height: 8em; }
    form input#submit { width: auto; }
// Form Properties
$o = new form_generator();
$o->name = "add_user";
$o->method = "post";
$o->action = $_SERVER['REQUEST_URI'];
// Form Fields
$o->input = array(
'options' => array('OH'=>'Ohio','CA'=>'California','FL'=>'Florida'),
'value'=>'this is an assload of text that should show up in the textare as the current value',



For more information send a message to info at phpclasses dot org.