Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/form.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michele Brodoloni  >  PHP Dialog  >  examples/form.php  >  Download  
File: examples/form.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Dialog
Create console based UIs with the dialog program
Author: By
Last change: Added phpdoc-style comments to source code (most of)
Added a README file with installation instructions
Made some fixes into main class code
Made some changes to the example scripts and checked if they work

Date: 2012-04-11 17:51
Size: 577 bytes
 

Contents

Class file image Download
#!/usr/bin/php
<?php

require_once '../include/class.dialog.php';

$dialog Dialog::factory('form');

$dialog->setFormHeight(20)
       ->
addField('Username',    11'utente',   11220, -1)
       ->
addField('Name'21'passwd',   212200)
       ->
addField('Surname',    31'sysadmin'312200)
       ->
addFields(array(
            array(
'Username'41'utente',   5110, -1),
            array(
'Username'61'utente',   7110, -1),
            array(
'Username'81'utente',   9110, -1),
        ));

$res $dialog->show();

echo 
"Risultato: $res\n";
var_dump($res);

exit();