PHP Classes

Form Table Generator: Generate forms to add or edit MySQL table records

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 44%Total: 2,458 All time: 1,578 This week: 39Up
Version License PHP version Categories
ftg 1GNU Lesser Genera...4HTML, Databases
Description 

Author

This class can be used to generate HTML forms, based on table schema automaically deterimend from a database table. The HTML can be customised.

It retrieves the list of fields of a given MySQL database table. Then it generates HTML forms for entering values of records of that table.

The table primary key field can be automatically omitted from the output.

The generated forms may be populated with default values when the forms are generated in edit mode.

An XML configuration file can be used to define how to map the table fields into form inputs. The configuration file can also be used to add, remove or customise form sections.

The generated forms can be returned as a string or saved to a file.

Picture of Michael Burgess
Name: Michael Burgess <contact>
Classes: 3 packages by
Country: United Kingdom
Age: 35
All time rank: 52628 in United Kingdom
Week rank: 227 Up14 in United Kingdom Up

Details

::FormTableGenerator:: Michael J. Burgess ThinkChemical@GoogleMail.com Generate user-submission forms aligned with a html table by simply suppling a database link and a table name. Generate forms to 'add' or 'edit' data (forms have no php-based submission code associated) choosing 'edit' populates fields with php-variable default values. The primary key can be automatically removed from the output. Database field types e.g. varchar, are mapped in an xml config file, to html form fields. You can add, customise or remove any section of the html generated from within the xml file. Author-written documentation regarding configuration and use is supplied. The class either generates a string or saves to a file. There are also many more possibilities accesible via configuration of the xml file. Examples provided. Test script provided. Read Manual before use as default values may not suite your database.

Screenshots (1)  
  • extra/raw_output.jpg
  Files folder image Files (11)  
File Role Description
Files folder imageextra (5 files)
Plain text file FormTableGenerator.class.php Class Main Class File
Plain text file readme.txt Doc. Relevant Package Info
Plain text file Unserializer.php Class Modified PEAR Package
Accessible without login Plain text file ftg.config.xml Data Configuration File
Plain text file ftg.config.xsd.xml Data Configuration File XSD

  Files folder image Files (11)  /  extra  
File Role Description
  Accessible without login Plain text file Manual.html Doc. Package Manual
  Accessible without login Plain text file examples.php Example Examples of Use
  Plain text file tests.php Example Test Class Methods
  Accessible without login HTML file html_output.php Output Raw Output as html file
  Plain text file GPL_Version2.txt Lic. Licence

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,458
This week:0
All time:1,578
This week:39Up
 User Ratings  
 
 All time
Utility:50%StarStarStar
Consistency:66%StarStarStarStar
Documentation:58%StarStarStar
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:44%StarStarStar
Rank:3504