Code Monkey home page Code Monkey logo

phpformgenerator's Introduction

PhpFormGenerator

Donate Build Status Code Intelligence Status Scrutinizer Code Quality

The Ultimate PHP Form Generator Class is developed with the following goals in mind...

  • promotes rapid development of HTML forms through an object-oriented PHP framework.
  • Eliminate the grunt/repetitive work of writing the html when building forms.
  • Reduce human error by using a consistent/tested utility.

The Iriven Php FormGenerator adhere to W3C standards. Give it a try and let me know what you like, hate, and think needs to be fixed.

Availlable Methods:

- Open($attributes = [])
- addAudio($label,$attributes=[])
- addButton($label,$attributes=[])
- addCaptcha($label,$attributes=[])
- addCheckbox($label,$options = [],$attributes=[])
- addColor($label,$attributes=[])
- addCountries($label,$attributes=[])
- addDatalist($label, $options=[], $attributes = [])
- addDate($label,$attributes=[])
- addDatetime($label,$attributes=[])
- addDatetimeLocal($label,$attributes=[])
- addEditor($label,$attributes=[])
- addEmail($label,$attributes=[])
- addFieldset($attributes=[])
- addFile($label,$attributes=[])
- addHidden($label,$attributes=[])
- addHtml($html)
- addImage($label,$attributes=[])
- addMonth($label,$attributes=[])
- addNumber($label,$attributes=[])
- addPassword($label,$attributes=[])
- addPhone($label,$attributes=[])
- addRadio($label,$options=[],$attributes=[])
- addRange($label,$attributes=[])
- addReset($label,$attributes=[])
- addSearch($label,$attributes=[])
- addSelect($label,array $options = [],$attributes=[])
- addSubmit($label,$attributes=[])
- addText($label,$attributes=[])
- addTextarea($label,$attributes=[])
- addTime($label,$attributes=[])
- addUrl($label,$attributes=[])
- addVideo($label,$attributes=[])
- addWeek($label,$attributes=[])
- addYesNo($label,$attributes=[])
- Close($print=true)

Usage:

Installation And Initialisation

require_once 'FormGenerator.php';
$form = new Iriven\FormGenerator()
Example

PhpFormGenerator provides a fluent method of form creation, allowing you to do:

    $form->Open(['method'=>'post'])
    ->addFieldset(['legend'=>'Etat-Civil'])
    ->addText('nom')
    ->addText('prenom')
    ->addYesNo('es-tu content?')
    ->addDate('aniversaire')
    ->addCheckbox('votre sexe',['M','F'])
    ->addCountry('votre pays')
    ->addFieldset(['legend'=>'Informations Générales'])
    ->addSelect('SimpleSelect',['0'=>'faux','1'=>'vrai'])
    ->addSelect('OptGroupSelect',['collaborateurs'=>['0'=>'aucun','1'=>'1 personne','6'=>'6 personnes'],'auteur'=>['2'=>'alfred','3'=>'iriven','4'=>'iriventeam']],['name'=>'selection2','value'=>'3'])
    ->addSelect('OptGroupMultiSelect',['collaborateurs'=>['0'=>'aucun','1'=>'1 personne','6'=>'6 personnes'],'auteur'=>['2'=>'alfred','3'=>'iriven','4'=>'iriventeam']],['name'=>'selection3','multiple'=>'multiple'])
    ->addPassword('mot de passe')
    ->addCaptcha('Quel est le Resultat de')
    ->addFile('fichier')
    ->addAudio('audio')
    ->addImage('image')
    ->addVideo('video')
    ->addRange('intervalle',['step'=>'5'])
    ->addNumber('numero',['step'=>'5'])
    ->addSearch('recherche')
    ->addButton('bouton')
    ->addEmail('email')
    ->addPhone('telephone',['required'=>'required'])
    ->addTextarea('message')
    ->addSubmit('envoyer')
    ->Close();

Authors

License

This project is licensed under the GNU General Public License V3 - see the LICENSE file for details

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate

Disclaimer

If you use this library in your project please add a backlink to this page by this code.

<a href="https://github.com/iriven/PhpFormGenerator" target="_blank">This Project Uses Alfred's TCHONDJO PhpFormGenerator Library.</a>

phpformgenerator's People

Contributors

iriven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cameolon mimimifu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.