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 - 09-24-2009 [eluser]groyk[/eluser] I have solved it by running my function direct from "users/edit" and then redirect. It is just for a simple login. Code: # Login form Form Generation Library - El Forum - 10-06-2009 [eluser]hugle[/eluser] [quote author="macigniter" date="1253238090"]BTW... anyone still interested in helping to complete the user guide? I am just too busy at the moment but nevertheless would love the guide to be complete. So if you are using the library for a while now and feel confident enought to contribute your help will be greatly appreciated![/quote] Hello, I use your library only for two days (just looking at it, testing, etc) But I feel start to love it I could write some basic text, but I'm not english ) I saw peaople have some problems with uploads, I think when I'm done with it - I could add some information to howto. now the problem is, if I even add required false, like: Code: ->upload('file', 'Upload Image', false) - The upload path does not appear to be valid. Imho, the upload path shouldn't be checked... if there is no 'required' ... [edited] confirmed, if I do for example: Code: $upload = array( Everything works just fine! [end of edit] thanks! Form Generation Library - El Forum - 10-12-2009 [eluser]hugle[/eluser] Hello everyone, I think I'll start from the BUG maybe, i found .... Ireally hope it isn't but then I must be doing something really wrong So I'll start.... my controller: Code: $this->form->open('profile/post_ad') I have also extended the form_validation class, with: Code: function test1($str) { return 'test1_string'; } my model ads.php is: Code: function post_ad(&$form, $post_data) the strange thing is ... that output I should get from model should be : 'test1_string' since test1 rule returns it... but output I get is always the value I put into form field... I think something somewehre should be worng or I am doing somthing wrong I thought maybe the function `test1` wasn't called - but I added echo there, and it is working Maybe some of you met similar problems and have some ideas? I really like this library, it saves like lot of hours of creating labels etc Hope that helps you to understand my problem, and maybe help me fixing it.. thanks [edit] I also wanted to add, that I was doing tests with basic form_validation with the same rules, and the result I got was 'test1_string' [/edit] cheers, huglester Form Generation Library - El Forum - 10-19-2009 [eluser]Mat-Moo[/eluser] Damn dude, 10/10 this is an awesome library! Most my CI projects have required only small forms, and although I've written helpers the forms have never been worthy of a library. Today I find myself working of several forms with lots of fields and started to modify my code to basically do what you are doing. Before working hard on this, I had a quick look through the CI forums and found this! So far I've already done one form, and I'm still learning this fantastic library! I've a lot to learn but I believe to date this will be the best ever 3rd party library for me! Form Generation Library - El Forum - 10-20-2009 [eluser]Paul T[/eluser] So glad to see the continued development of this awesome library. I can't imagine building forms without it! Good work on the reCAPTCHA function. One problem, though. It seems that at least some (all?) spam bots do not have javascript. In this case, the reCAPTCHA reverts to using an iframe which is not required, thereby defeating/bypassing the spam protection of the form. I'd love to see a fix for this. In the meantime, I'm going to have to make my javascript "obtrusive." Oh, another thing. We upgraded our PHP to 5.3, which deprecates the split function found in various places in libraries/Form.php. Simply changing "split" to "explode" fixes it. Keep up the great work! Form Generation Library - El Forum - 10-20-2009 [eluser]hugle[/eluser] Hello again I must agree to both of you guys, I have one bug, but author now is busy with some project to answer with questions. Maybe someone of you wanna play and try to find a fix for that, to help develop this nice FORM application? Form Generation Library - El Forum - 10-20-2009 [eluser]dinhtrung[/eluser] After 2 hours code and F5, I found Form Generation very useful, but lack some major feature, especially the callback validation. So here is my experience with Form Generation. - If you want the form to show up an error, just use $form->add_error('field', 'message'). Because the lack of documentation, I spent more than an hour to use $form->set_error() or $form->set_error_label(). My mistake to not read the code carefully :"> - For callback feature, do it in the ($this->valid) block. So for a real example: Authenticate using dx_auth, Template library and Form Generation library: In controller (./applications/controllers/user.php) Code: function login() - For view, I use the default of Form Generation: applications/views/login.php Code: <h3>Login</h3> Form Generation Library - El Forum - 10-22-2009 [eluser]Mat-Moo[/eluser] In the break_after, I was trying to get radiogroups to work, but I can only seem to get radio to work and ot radiobuttons. What and I missing? Form Generation Library - El Forum - 10-22-2009 [eluser]hugle[/eluser] [quote author="macigniter" date="1253068962"][quote author="groyk" date="1252946144"] One of my controllers contains multiply forms. In the form generator I need something like Code: $this->form->destroy(); Else when I call Code: $this->form->open('my_form') I still get the output from the first. [/quote] This will be available in the next version! I will hope to release it soon. If you need that function instantly, feel free to insert this code right after the Form() function: Code: function flush() You can then use: Code: $this->form->flush(); in between two forms in the same controller. Don't forget to clear out the $data['form'] and/or $data['errors'] variables.[/quote] thank you. it helped me by the way, maybe some of you tried passing some options to select, to make some of options 'disabled'? of maybe you have suggestions how this can be done? thank you! Form Generation Library - El Forum - 10-24-2009 [eluser]wiredesignz[/eluser] @macigniter, You've done a great job with this, It's really quite impressive. Thanks. Creating forms as partials and being able to load them using your class may be beneficial to others so I submit this PHP5 extension that I am using with Modular Extensions - PHP5, to give you an idea of what is possible with this library. You might like to consider something similar (for regular CI) added directly to the class. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Controller code Code: $this->load->library('mx_form', '', 'form'); |