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 - 01-18-2010

[eluser]Yash[/eluser]
Thank you so much

This is an awesome library. Just started using it.


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

[eluser]Maglok[/eluser]
I have a quick question. I am just starting to use this library and it all works wonderfully. There is just one thing. I have not changed my config form.php and whatever I do it will not put the element_suffix of '<br />' in the generated form code. I tries changing the config but it just doesn't seem to add that to the end of an element.

The config file does work, for if I change the error wrapping, I get that changed.

I literally copy pasted the code in your 'getting started' page. It displays nicely, just doesn't break line after each element.

What am I doing wrong?


Form Generation Library - El Forum - 01-19-2010

[eluser]Maglok[/eluser]
Excuse the double post.

There are some more issues that I wonder about.

If I use radiogroup() there is no label, while I do define it:

Code:
->radiogroup('gender', $gender, 'Gender:', 'man')

I just can't seem to let the checkboxes stretch more then that small width and the label of those radiogroups is totally gone. And there is still the mystery of the element_suffix not getting generated.

http://test.lore-ley.nl/profiel/persoon/ <--Running example.


Form Generation Library - El Forum - 01-19-2010

[eluser]dinhtrung[/eluser]
I would assigns those form in a class variable.
Code:
function adjust( $val, $caller )
    {
        // use this form element to adjust the quantity of a particular inventory item
        $this->{'form_'.$caller} = new $this->form();
        $$this->{'form_'.$caller}->open('path')
            ->text( 'qty_'.$caller,'','required|trim|max_length[3]', $val );
    }
in the "ACTIONS" column I want to call adjust_submit to show the submit button of the same form.
Code:
function adjust_submit( $caller )
    {
        $this->{'form_'.$caller}->submit('Submit', 'sub_'.$caller)
            ->validate();
        $data['form_'.$caller.'_data'] = $this->{'form_'.$caller}->get();
        $data['form_'.$caller.'_errors'] = $this->{'form_'.$caller}->errors;
        $data['caller']=$caller;
        $this->load->view('form', $data);

    }



Form Generation Library - El Forum - 01-19-2010

[eluser]Deep Arora[/eluser]
How do I arrange the placement of form fields? Pls look at the attached screenshot. It displays the field name and form field without any space.

How do I control that?


Form Generation Library - El Forum - 01-20-2010

[eluser]Moru789[/eluser]
Make sure you have the CSS file installed and that the class-names on all items match the CSS-rules.


Form Generation Library - El Forum - 01-20-2010

[eluser]Maglok[/eluser]
I set up the demo on my server. It seems like two 'bugs' in the library. There must be something in my host, but as far as I know it is just PHP 5.

Issues
- Does not generate labels on radiogroups
- Does not generate element_suffix

Mine: http://test.lore-ley.nl/welcome
Official demo: http://www.frankmichel.de/formgenlib/

Both use the exact same code. I only moved the stylesheet directory.


Form Generation Library - El Forum - 01-23-2010

[eluser]happydude[/eluser]
OK. Sorry people for not getting back to you since. I got caught up in another project, and recently, the owner of the project where I had problem with editing forms created with Form generation library wants it done ASAP.

I also made an error earlier. If the form does not validate, it repopulates it with POSTed values. It only repopulates the form with values from the DB when the form validates.

This can be utterly confusing to the end user as they will more likely want to see that their edit has taken place successfully and the recently updated values are being displayed in the form.


Form Generation Library - El Forum - 01-23-2010

[eluser]hugle[/eluser]
[quote author="happydude" date="1264252882"]OK. Sorry people for not getting back to you since. I got caught up in another project, and recently, the owner of the project where I had problem with editing forms created with Form generation library wants it done ASAP.

I also made an error earlier. If the form does not validate, it repopulates it with POSTed values. It only repopulates the form with values from the DB when the form validates.

This can be utterly confusing to the end user as they will more likely want to see that their edit has taken place successfully and the recently updated values are being displayed in the form.[/quote]

can you please once more explain the problem AND post your
controller and view

thanks


Form Generation Library - El Forum - 01-23-2010

[eluser]hugle[/eluser]
[quote author="Maglok" date="1263997278"]I set up the demo on my server. It seems like two 'bugs' in the library. There must be something in my host, but as far as I know it is just PHP 5.

Issues
- Does not generate labels on radiogroups
- Does not generate element_suffix

Mine: http://test.lore-ley.nl/welcome
Official demo: http://www.frankmichel.de/formgenlib/

Both use the exact same code. I only moved the stylesheet directory.[/quote]

are you sure it is clean install of FGL ?
which version of FGL? it linux or win?

I tested it on two different machines - all ok with default config/controller/view