• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form Generation Library

#1
[eluser]macigniter[/eluser]
Quote:New version 2.0.2 available!
Please read the changelog before downloading and upgrading

Welcome to the home of the Form Generation Library, a project that will help you to accelerate your form creation and reduce your coding efforts.

The Form Generation Library is based on the idea of Benjamin Midget's Midget Forms (which is no longer actively developed) and is maintained and developed by Frank Michel. I am always looking forward to code improvements or bug reports, so if you find anything please let me know [info at frankmichel dot com]! I'd love to include it in the next release.

The library is generating valid XHTML and utilizes CI's form validation including the support of custom callback functions. Take a look at the demo form.

I have developed a user guide that gives you some help in understanding how the library works.

If you download the files you will also find lots of comments that will explain how to use the library and its methods. You can choose between two download options (with or without user guide).

Please see the user guide for installation guidelines.

The user guide also provides important information about the config file and usage of the various form elements.

Last, but not least please take a look at the release notes to keep up with the latest updates and changes.

I hope you enjoy the library and help to make it even better. If you're using it for commercial projects I would appreciate a small donation. As a thank you please grab one of the Form Generation Library Quick Reference guides.

Cheers,
Frank

IMPORTANT:
Verson 2.0 requires CodeIgniter > 2.0.0

Verson 1.0 includes major udpates and changed syntax in various places. Please read the upgrade instructions on the download page.

Version 0.1.5 changes the way the config file is set-up. Please read the user guide and change your existing config files to match the new standard.

#2
[eluser]brianw1975[/eluser]
I'm very interested in this, please keep us (or me) posted.

#3
[eluser]abmcr[/eluser]
Wow!!!! i'm very interest also

#4
[eluser]Tom Schlick[/eluser]
Post the PHP file or its not true!!! haha jk but i would be happy to test it out for you and give feedback.

#5
[eluser]Fero[/eluser]
I only hope it's true, I'll kiss the ground you walk for this one!

#6
[eluser]Colin Williams[/eluser]
Been wanting to do this myself for some time now. There are other versions out there, but I'll be interested to see what you've done.

#7
[eluser]macigniter[/eluser]
I knew this one would draw attention Smile But the good news is that it really is true and I am working hard to release it asap. The inspiration came from Benjamin Midget's MidgetForms which was a great approach but unfortunately never got to version 1.0. Since i needed form generation asap i decided to build a library myself.

I added error handling today so the script auto validates the code and checks for correct syntax when adding elements to the form.

As a sneak peek these are the element methods which will be available in the library:

->fieldset(STR legend [, ARR|STR attributes])
->hidden(STR name|id [, STR value])
->label(STR label, STR for [, ARR|STR attributes])
->text(STR name|id [, STR label, STR rules, STR value, ARR|STR attributes])
->password(STR name|id [, STR label , STR rules, STR value, ARR|STR attributes])
->textarea(STR name|id [, STR label, STR rules, STR value, ARR|STR attributes])
->upload(STR name|id [, STR label, BOOL required, ARR|STR attributes])
->iupload()
->select(STR name|id, ARR options [, STR label, ARR|STR selected, STR rules, ARR|STR attributes])
->checkbox(STR name|id, STR value [, STR label, BOOL checked, STR rules, ARR|STR attributes])
->checkgroup(STR name, ARR checks [, ARR|STR checked, STR rules, ARR|STR attributes])
->radiogroup(STR name, ARR radios [, ARR|STR checked, STR rules, ARR|STR attributes])
->button(STR content [, STR name|id, STR type, ARR|STR attributes])
->image(STR src [, STR name|id, ARR|STR attributes])
->submit([STR value, STR name|id, ARR|STR attributes])
->reset([STR value, STR name|id, ARR|STR attributes])
->span(STR content [, ARR|STR attributes])
->html(STR content)
->br()
->hr()
->space()

To add an element id you can pipe the name parameter like "elname|elid" where the id is an optional parameter. If an id is mandatory (such as for a label's for attribute) and you didn't specify it the library will automatically generate a unique id for you.

Moreover there will be lots of methods to add classes, rules, errors, attributes, etc.

I'll keep you all posted!

#8
[eluser]brianw1975[/eluser]
any info on doctype? will it support both html and xhtml?

what about the form tag attribs? name, id, action, enctype, etc?

#9
[eluser]Fero[/eluser]
I want to see some example of usage Wink


[quote author="macigniter" date="1236470921"]I knew this one would draw attention Smile But the good news is that it really is true and I am working hard to release it asap. The inspiration came from Benjamin Midget's MidgetForms which was a great approach but unfortunately never got to version 1.0. Since i needed form generation asap i decided to build a library myself.

I added error handling today so the script auto validates the code and checks for correct syntax when adding elements to the form.

As a sneak peek these are the element methods which will be available in the library:

->fieldset(STR legend [, ARR|STR attributes])
->hidden(STR name|id [, STR value])
->label(STR label, STR for [, ARR|STR attributes])
->text(STR name|id [, STR label, STR rules, STR value, ARR|STR attributes])
->password(STR name|id [, STR label , STR rules, STR value, ARR|STR attributes])
->textarea(STR name|id [, STR label, STR rules, STR value, ARR|STR attributes])
->upload(STR name|id [, STR label, BOOL required, ARR|STR attributes])
->iupload()
->select(STR name|id, ARR options [, STR label, ARR|STR selected, STR rules, ARR|STR attributes])
->checkbox(STR name|id, STR value [, STR label, BOOL checked, STR rules, ARR|STR attributes])
->checkgroup(STR name, ARR checks [, ARR|STR checked, STR rules, ARR|STR attributes])
->radiogroup(STR name, ARR radios [, ARR|STR checked, STR rules, ARR|STR attributes])
->button(STR content [, STR name|id, STR type, ARR|STR attributes])
->image(STR src [, STR name|id, ARR|STR attributes])
->submit([STR value, STR name|id, ARR|STR attributes])
->reset([STR value, STR name|id, ARR|STR attributes])
->span(STR content [, ARR|STR attributes])
->html(STR content)
->br()
->hr()
->space()

To add an element id you can pipe the name parameter like "elname|elid" where the id is an optional parameter. If an id is mandatory (such as for a label's for attribute) and you didn't specify it the library will automatically generate a unique id for you.

Moreover there will be lots of methods to add classes, rules, errors, attributes, etc.

I'll keep you all posted![/quote]

#10
[eluser]phused[/eluser]
This seems very interesting, looking forward to it.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.