CodeIgniter Forums
Form Generation Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Form Generation Library (/showthread.php?tid=16439)



Form Generation Library - El Forum - 03-02-2010

[eluser]seanloving[/eluser]
Does anybody have a working example of how to integrate jQuery autocomplete with FGL?

I see many CI discussion topics about various autocomplete solutions, but not one of them appears to be thorough or complete. Tongue

Thanks


Form Generation Library - El Forum - 03-07-2010

[eluser]macigniter[/eluser]
Hi Everyone! Here is a small personal request. If you want to give back for using the library please visit the following website and vote for my input in this German Lufthansa competition. I'd really appreciate lots of clicks and votes from all of you guys! THANKS!!

Vote for Frank! (click on the "Wide Liner" box and vote for me...)

EDIT: You can vote for my proposal EVERY day until the end of March. So if you REALLY like Form Generation Library make a bookmark and hit 5 stars every day :-) That'd be awesome!!


Form Generation Library - El Forum - 03-07-2010

[eluser]BaRzO[/eluser]
I did 5 star Wink


Form Generation Library - El Forum - 03-07-2010

[eluser]Mat-Moo[/eluser]
Done, what am I voting for?


Form Generation Library - El Forum - 03-07-2010

[eluser]macigniter[/eluser]
[quote author="BaRzO" date="1268002604"]I did 5 star Wink[/quote]

Thanks :-)

[quote author="Mat-Moo" date="1268003324"]Done, what am I voting for?[/quote]

You are voting for my proposal of giving the new A380 fleet of German airline Lufthansa a generic name. Just like back in the days when "Jumbo Jet" was established for the Boeing 747.


Form Generation Library - El Forum - 03-08-2010

[eluser]Maglok[/eluser]
It is done! Smile

Been using FGL in some more work applications. So far it is saving me hours of work.


Form Generation Library - El Forum - 03-09-2010

[eluser]hugle[/eluser]
Hello everyone Smile
I'm woting sometimses, hehe

This lib is amazing, I thing it saves 10x more time while creating form, or even 20xSmile))

Wanted to include small fix,

the Form.php
the array $_valid_atts;
is missing 'autocomplete' in the 'input' Smile

I think more people will need this Smile

good luck!
and thank you


Form Generation Library - El Forum - 03-10-2010

[eluser]loosetops[/eluser]
Possible Bug

This form code in my controller method
Code:
->text('model','Model','trim|required|xss_clean')

Leads to multiple errors in this function
Code:
function _load_model()
    {
        if ($this->_posted && count($this->model))
        {
            foreach ($this->model as $model)
            {
                // combine data provided with POST data (validated at this time)
                $model_data = array_merge($model['data'], $_POST);

                // add file upload data
                $model_data = array_merge($model_data, $this->_data);
                
                $this->CI->load->model($model['name']);
                $this->CI->{$model['name']}->{$model['method']}($this, $model_data); // $this = form library handle
            }
        }
    }

The error messages are
Quote:Message: Undefined index: data
Message: array_merge() [function.array-merge]: Argument #1 is not an array
Message: array_merge() [function.array-merge]: Argument #1 is not an array
Message: Undefined index: name
Message: Undefined index: name
Message: Undefined index: method

When I change the code to
Code:
->text('modelx','Model','trim|required|xss_clean')
Changed model to modelx

The errors goes away.

i.e. A text input field with the name model makes the library try load some non existent model. When the errors happen, print_r($this->model) outputs the El Object.


Form Generation Library - El Forum - 03-17-2010

[eluser]hugle[/eluser]
[quote author="loosetops" date="1268271888"]Possible Bug

This form code in my controller method
Code:
->text('model','Model','trim|required|xss_clean')

Leads to multiple errors in this function
Code:
function _load_model()
    {
        if ($this->_posted && count($this->model))
        {
            foreach ($this->model as $model)
            {
                // combine data provided with POST data (validated at this time)
                $model_data = array_merge($model['data'], $_POST);

                // add file upload data
                $model_data = array_merge($model_data, $this->_data);
                
                $this->CI->load->model($model['name']);
                $this->CI->{$model['name']}->{$model['method']}($this, $model_data); // $this = form library handle
            }
        }
    }

The error messages are
Quote:Message: Undefined index: data
Message: array_merge() [function.array-merge]: Argument #1 is not an array
Message: array_merge() [function.array-merge]: Argument #1 is not an array
Message: Undefined index: name
Message: Undefined index: name
Message: Undefined index: method

When I change the code to
Code:
->text('modelx','Model','trim|required|xss_clean')
Changed model to modelx

The errors goes away.

i.e. A text input field with the name model makes the library try load some non existent model. When the errors happen, print_r($this->model) outputs the El Object.[/quote]

I think you just can't use model, as a name for an item of the form, that's it...


Form Generation Library - El Forum - 03-18-2010

[eluser]Maglok[/eluser]
I have run into a thing I'd like to do. How would one create a list of options from which people can click more then one? This is not a multiple options thing, just a list that is not a whole slew of checkboxes.