Git Product home page Git Product logo

arnoldobr / formhandler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tombrain/formhandler

0.0 1.0 1.0 1.86 MB

FormHandler is a PHP written "module" which allows you to create dynamic forms in an easy way. So easy that you can build a fully working form, including field validations, within 10 lines!

Home Page: http://www.formhandler.net/

License: Other

PHP 44.55% JavaScript 33.21% CSS 18.41% HTML 3.40% Smarty 0.43%

formhandler's Introduction

FormHandler

GitHub license Build Status

FormHandler is a PHP written "module" which allows you to create dynamic forms in an easy way. So easy that you can build a fully working form, including field validations, within 10 lines!

Installation

Copy the package to some site on your project.

When the vendor directory is outside the root directory of your web application use a symlink on the FHTML directory to make it publicly available.

For example: map vendor/formhandler/formhandler/src/FHTML to /FHTML/ of your website root. Then add to your application

Basic Usage

<?php

//include the class (only needed when not using Composer)
include "FH3/class.FormHandler.php";
fh_conf('FH_FHTML_DIR', 'FH3/FHTML/');


//create a new FormHandler object
$form = new FormHandler();

//some fields.. (see manual for examples)
$form->textField("Name", "name", FH_STRING, 20, 40);
$form->textField("Age", "age", FH_INTEGER, 4, 2);

//button for submitting
$form->submitButton();

//set the 'commit-after-form' function
$form->onCorrect('doRun');

//display the form
$form->flush();

//the 'commit-after-form' function
function doRun($data)
{
    echo "Hello ". $data['name'].", you are ".$data['age'] ." years old!";
}

Documentation

For an extended version of the documentation please check our manual located at http://www.fh3.nl/manual/manual.html

License

FormHandler is licensed under the GNU Lesser General Public License Version 2.1 - see the LICENSE file for details

formhandler's People

Contributors

jwiegel avatar tombrain avatar mariendev avatar daybeld avatar arnoldobr avatar

Watchers

James Cloos avatar

Forkers

daybeld

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.