Welcome Guest, Not a member yet? Register   Sign In
FormIgniter.org launched - Easy form generator - source code now available
#1

[eluser]Ollie Rattue[/eluser]
Here is something I put together over the Easter weekend.

The problem

Building validated forms in Code Igniter takes too long because names and values need to be entered multiple times. To build a form with the form validator and form libraries you need to enter the same value in multiple places; 3 times in the view, the label, the fields error message, and the field itself, again in the controller, once more in the model, and finally you need to setup the database schema to accept these values. This is repetitive and dull.

The Solution

Build a little application to automate the large majority of this process.

Considerations

Forms tend to have some bespoke element (AJAX, sessions, custom callbacks etc). Often libraries and scripts tend to try and do the whole process and thus force you into a mold. FormIgniter should simply write 4 files; the MVC and the db schema and then get out of the way.

Where can I find this?

The live application is at http://formigniter.org/app

Further explanation and source code can be found at http://formigniter.org.

Closing Words

Let me know what you think, and any bugs you may find. I don't intend to add much to it (simplicity is key), but will be tweaking the interface over the next couple of weeks to make it a little slicker.

Thanks,
#2

[eluser]bafadam[/eluser]
Wow. That's pretty cool.

Another shortcut you may want to put in there, though, is a text field for custom function validation.
#3

[eluser]phused[/eluser]
Amazing, thanks for sharing that.

Making forms and validating them with CI is easy, this just takes easy to a next level!
#4

[eluser]Iverson[/eluser]
And people wonder why CodeIgniter is the best f***ing PHP framework out there. Bugs or no bugs, good job dude.
#5

[eluser]Iverson[/eluser]
I just tried it out. WTF...lol. This is insane! I'm sure the more we play with we'll find some flaws here and there, but this functionality is unparalleled. Hats off. Now I have to go off and find something better to contribute! :coolsmirk:
#6

[eluser]Ollie Rattue[/eluser]
Hey guys, thanks for the encouraging feedback. It is really great to hear that you like FormIgniter.

[quote author="bafadam" date="1239741327"]Wow. That's pretty cool.

Another shortcut you may want to put in there, though, is a text field for custom function validation.[/quote]

I presume you mean Callbacks http://ellislab.com/codeigniter/user-gui...#callbacks which is a possibility. I wanted to keep the user interface as clean and uncluttered as possible. FormIgniter is intended to satisfy basic form validation requirements and then get out the way. My thinking was that custom callbacks need to be coded separately and so they could be added to the code FormIgniter generates. Interested to hear what others think about this though...

One thing that I would love to get some feedback on is whether the form_name Javascript autocomplete is useful. I find that it is for things like First Name where it would produce first_name, but it becomes less useful when your labels get longer. I think I will add a tickbox at the top to turn this feature ON or OFF.

Please let me know if you spot any bugs, or problems.

Thanks a lot everyone.
#7

[eluser]playaz[/eluser]
OMG! You Rule!!

This is a massive time saver! You are a god send! This is a brilliant 'app' had a play and this looks great, keep up the good work dude!!!

We Salute you!
#8

[eluser]got 2 doodle[/eluser]
the site seems to be down

:down:

doodle
#9

[eluser]Ollie Rattue[/eluser]
[quote author="got 2 doodle" date="1242252016"]the site seems to be down

:down:

doodle[/quote]

Just been playing around with Apache Bechmark. Looks like I pushed my 256MB slice a little too hard.

Everything is back online now.
#10

[eluser]got 2 doodle[/eluser]
Slick!

Aren't servers fun!!

doodle




Theme © iAndrew 2016 - Forum software by © MyBB