Part of the EllisLab Network
   
2 of 5
2
FormIgniter.org launched - Easy form generator - source code now available
Posted: 13 May 2009 05:20 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  08-11-2008

drewbee, thanks for the insightful feedback. I really like the maxlength feature. As you say it is something thats suits FormIgniter. You enter the data quickly once and it reproduces it in numerous places; removing the repition is what it is all about. I will add this in when I get a moment, aswell as auto setting the ‘DB field Length/Values’ in the database Schema smile

drewbee - 13 May 2009 07:08 PM

Very cool start to something here though!!! smile I guess from the configuration point, it’s really just about building it to be completely custom to how the user outputs code. If I could specify how it builds the output in the view, controller, model etc that is even sicker!!

Again the arrays format is interesting, and feeds into a larger question about what FormIgniter is for. When I use FormIgniter myself, I take its output (or sometimes just a section of it) as my base from which I can then add the more bespoke features (AJAX, custom callbacks, session data, autoresponders etc).

FormIgniter saves me time, and means I don’t have to do the boring drudge work. My idea was that 60-70% of building a validated form using CodeIgniters mechanisms is repition. If a code generator can do this for me then great!

However adding endless configuration options perhaps enters a situation of diminishing returns. As it is the interface is clean and IMO pretty easy to use. Perhaps it would be easy to complicate something that ultimate was designed for a simple task.

I intend to tidy the codebase up (horribly messy at the moment) and upload the source code. It would then be easy to customise the output to your way of working.

Thanks again for taking the time to post your thoughts.

 Signature 

FormIgniter - Easy form generator for the CodeIgniter framework
Too many tabs - My weblog about web app development, startups, productivity and life design
Barometer - The easiest way to add a stylish feedback form to your website.
My Github code - Sage Pay, Autoresponder, EPDQ libraries
Follow me on Twitter

Profile
 
 
Posted: 17 September 2009 04:57 PM   [ Ignore ]   [ # 12 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  08-11-2008

Source code finally available at http://formigniter.org/source_code

 Signature 

FormIgniter - Easy form generator for the CodeIgniter framework
Too many tabs - My weblog about web app development, startups, productivity and life design
Barometer - The easiest way to add a stylish feedback form to your website.
My Github code - Sage Pay, Autoresponder, EPDQ libraries
Follow me on Twitter

Profile
 
 
Posted: 17 September 2009 06:02 PM   [ Ignore ]   [ # 13 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  3183
Joined  06-11-2007

This should have a “more” button next to validation which could slide down an input box to write any validation rule in. Or it could use some reflection to get a list of all supported validation methods available (along the lines of get_class_methods.

It’s a very snazzy little app though, good job! grin

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

Profile
 
 
Posted: 18 September 2009 12:50 AM   [ Ignore ]   [ # 14 ]  
Summer Student
Avatar
Total Posts:  17
Joined  09-14-2009

I can’t download….it

please…any another link…to get the source


thank’s

M4d3

 Signature 

Gaya Fusion - Ceramic & Design

Profile
 
 
Posted: 18 September 2009 06:01 AM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  08-11-2008

Now corrected smile

 Signature 

FormIgniter - Easy form generator for the CodeIgniter framework
Too many tabs - My weblog about web app development, startups, productivity and life design
Barometer - The easiest way to add a stylish feedback form to your website.
My Github code - Sage Pay, Autoresponder, EPDQ libraries
Follow me on Twitter

Profile
 
 
Posted: 05 October 2009 04:28 PM   [ Ignore ]   [ # 16 ]  
Summer Student
Total Posts:  13
Joined  10-05-2009

Nice tool!

One question - why are you not using form helper for all elements, eg:

<input id="test" type="text" name="test" value="<?php echo set_value('test'); ?> 

vs

$data = array(
              
'name'        => 'test',
              
'id'          => 'test',
              
'value'       => 'test'
            
);

echo 
form_input($data); 

I realize it is more code this way… but in some ways this makes the code reusable.

John

Profile
 
 
Posted: 06 October 2009 05:38 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  08-11-2008
ururk - 05 October 2009 08:28 PM

Nice tool!

One question - why are you not using form helper for all elements, eg:

<input id="test" type="text" name="test" value="<?php echo set_value('test'); ?> 

vs

$data = array(
              
'name'        => 'test',
              
'id'          => 'test',
              
'value'       => 'test'
            
);

echo 
form_input($data); 

I realize it is more code this way… but in some ways this makes the code reusable.

John

Thanks for you useful feedback. I have not included the form helper for all the form elements, because I simply don’t find it useful. A helper is meant to ‘help’ you write less code, however for a text input the code above is as long.

A example of a very useful form helper is for Selects, where an array can be passed for the options, and the select option can be easily repopulated. Writting this in html would take significantly longer.

<?php $options = array(
                      
''  => 'Please Select',
                      
'example_value1' => 'example option 1'
                      'example_value2' 
=> 'example option 2'
                      
); ?>

<br /><?=form_dropdown('test'$optionsset_value('test'))?> 

Another issue that prevents me from using html/form helpers, is that they tend to confuse frontend html/css developers. A frontend developer is able to work their way through html with the small bits of php code, but when it is all replaced with arrays and helpers of an unknown framework, it can often get confusing. It has then again ceased to add any benefit.

Finally it doesn’t actually matter if the non-helper version is longer (which I don’t think it is) as the writting of this code is automated by FormIgniter.

An option could be added to FormIgniter to output html or use the codeigniter helpers, but I think the time/gain ratio for this is low.

Opinionated software smile

 Signature 

FormIgniter - Easy form generator for the CodeIgniter framework
Too many tabs - My weblog about web app development, startups, productivity and life design
Barometer - The easiest way to add a stylish feedback form to your website.
My Github code - Sage Pay, Autoresponder, EPDQ libraries
Follow me on Twitter

Profile
 
 
Posted: 06 October 2009 08:36 AM   [ Ignore ]   [ # 18 ]  
Grad Student
Avatar
Rank
Total Posts:  59
Joined  01-16-2007

Cool tool. I tried it and found one issue. I would expect not to specify a db field length on a text area connected to a text field.
Good work!

Profile
 
 
Posted: 10 October 2009 09:50 PM   [ Ignore ]   [ # 19 ]  
Summer Student
Total Posts:  13
Joined  10-05-2009

Found just one small bug (I think?)...


In your controller:

if ($this->myform_model->SaveForm($form_data

In your model:

function save_form($form_data

So it should be:

if ($this->myform_model->save_form($form_data

 

Also, in your view:

echo form_open('my_form'$attributes); ?> 

Your class is ‘Myform’:

class Myform extends Controller {
               
    
function Myform() 

so it should be:

echo form_open('myform'$attributes); ?> 


Otherwise - pretty slick!

Profile
 
 
Posted: 26 October 2009 07:42 PM   [ Ignore ]   [ # 20 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  08-11-2008
ururk - 11 October 2009 01:50 AM

Found just one small bug (I think?)...


In your controller:

if ($this->myform_model->SaveForm($form_data

In your model:

function save_form($form_data

So it should be:

if ($this->myform_model->save_form($form_data

 

Many thanks for pointing this out. It has now been corrected.

 Signature 

FormIgniter - Easy form generator for the CodeIgniter framework
Too many tabs - My weblog about web app development, startups, productivity and life design
Barometer - The easiest way to add a stylish feedback form to your website.
My Github code - Sage Pay, Autoresponder, EPDQ libraries
Follow me on Twitter

Profile
 
 
   
2 of 5
2