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 - 11-27-2009 [eluser]Mat-Moo[/eluser] @dinhtrung - Perfect, added your mod and works a treat, would love to see this as official Form Generation Library - El Forum - 11-29-2009 [eluser]dinhtrung[/eluser] Found a bug in Form->submit() and Form->reset(), maybe Form->button(), either. First, I change this line to enable error message even if el['name'] cannot be found by _el_get_unique($name) Code: @@ -2015,8 +2017,7 @@ In the form, I still found <input type='submit' name='Submit' id='submit'> when I run $form->submit('Submit'), but when I submit, the same form appears, like nothing happens at all. This patch will just help fix submit() and reset(). Code: @@ -1264,6 +1264,7 @@ Form Generation Library - El Forum - 11-29-2009 [eluser]Mat-Moo[/eluser] @dinhtrung After applying your patch (before/after) stuff I now have a minor issue As I''m trying to use radio groups, I want Code: <div><label>blah blah blah</label>Radio button/Text, Radio button text</div> Code: <div><label>blah blah blah</label>Radio button</div> Form Generation Library - El Forum - 12-03-2009 [eluser]dinhtrung[/eluser] Yes, just apply this patch, and configure the library through its config/form.php with these: Code: $config['wrappers'] = array( Another improvement is open() methods. For now, if you don't specify the action URL, the current url ($this->uri->uri_string()) is used. Form Generation Library - El Forum - 12-04-2009 [eluser]hugle[/eluser] [quote author="dinhtrung" date="1259921990"] Don't know why I didn't do this earlier . Another improvement is open() methods. For now, if you don't specify the action URL, the current url ($this->uri->uri_string()) is used.[/quote] I was already thinking about that, and wanted to ask macigniter to include this also)) now he have to apply the patch this lib is amazing Form Generation Library - El Forum - 12-04-2009 [eluser]Mat-Moo[/eluser] @dinhtrung Thanks for your efforts, although I still could not get the formatting I required. A simple line wrapper maybe the best solution, that would be applied to every item. That could work for various options, e.g. <div> / </div>, <li> / </li> and keep each entity separate? Form Generation Library - El Forum - 12-04-2009 [eluser]dinhtrung[/eluser] @Mat-Moo : With the attached Form library in $config['wrapper'], I think you can render almost all structure of Form. Although it's more complex, but now you can separate the wrapper of label for some input type, and use another wrapper for others. The only thing left behind is the label position. In Form Gen, the label is put before or above for text, password, textarea, select but after for checkbox, radiobox. I think I'll add this feature later. Can you post your form structure to here? I'll try to extend the lib to support it. Form Generation Library - El Forum - 12-05-2009 [eluser]dinhtrung[/eluser] Tonight I tried to build a select box from Form Generation, and found out that the field always return an array. Code: $single = array( Code: <label for="single" class="left">Single Select</label> Form Generation Library - El Forum - 12-06-2009 [eluser]macigniter[/eluser] [quote author="Mat-Moo" date="1259353603"]@dinhtrung - Perfect, added your mod and works a treat, would love to see this as official [/quote] Hi Everyone, I actually spent today on implementing this feature as well as cleaning out some other things. I will release the updated official version soon. Although I agree that it would be nice to add more stuff to the library I really want to keep it as clean as possible and don't integrate every possible thing somebody might need. Just like CI itself is giving us the basics to work with I would like to keep this library clean and just help doing basic stuff. Anything else should be no problem to add manually or with some jQuery magic :-) Form Generation Library - El Forum - 12-06-2009 [eluser]macigniter[/eluser] [quote author="hugle" date="1259931255"][quote author="dinhtrung" date="1259921990"] Don't know why I didn't do this earlier . Another improvement is open() methods. For now, if you don't specify the action URL, the current url ($this->uri->uri_string()) is used.[/quote] I was already thinking about that, and wanted to ask macigniter to include this also)) now he have to apply the patch this lib is amazing [/quote] This will be included. Good one! |