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 - 12-10-2009 [eluser]antonumia[/eluser] Maybe a simple question but how do i convert the [recaptcha_challenge_field] so I can compare it with [recaptcha_response_field]? Do I need to use the recaptcha_check_answer function on their server or can i check it locally? Any example would be great! anton Form Generation Library - El Forum - 12-10-2009 [eluser]antonumia[/eluser] [quote author="antonumia" date="1260479003"]Maybe a simple question but how do i convert the [recaptcha_challenge_field] so I can compare it with [recaptcha_response_field]? Do I need to use the recaptcha_check_answer function on their server or can i check it locally? Any example would be great! anton[/quote] Duh, add ->validate() to your form constructor Form Generation Library - El Forum - 12-10-2009 [eluser]BaRzO[/eluser] @mat-moo with model this error comes Code: An Error Was Encountered i have used die function for to see what data comes from the form and it was killin all data from the form lib i have changed the code like this and it's working very well thanks for your help.. Code: class Test_class extends Controller { Form Generation Library - El Forum - 12-10-2009 [eluser]dinhtrung[/eluser] Tonight I played with widget_pi, Modular Separation and Form Generation, and found out the fact that only one the lastest model added is run if the form is valid. Please support multiple calls for methods and postprocess methods. An use case could be like this: I create a form for admin to add a new user into the system. The user must be assign a profile data in another table, and I don't want to mix the basic info and profile info for an user in only one table. So I create User_profile widgets, to handle profile data and Users controller to handle basic information. Code: /* File : modules/users/controllers/users.php */ Back to the multiple models issue, here is my modification: Code: --- ../devel/libraries/Form.php 2009-12-10 16:05:00.319910582 +0700 Form Generation Library - El Forum - 12-11-2009 [eluser]happydude[/eluser] I three questions: 1. What if I want the user to create form elements using javascript on the client side. (Something like "click here if you want to enter additional settings). 2. How do I integrate this library with datamapper. Can you please show an example? 3. How do I upload multiple images? Form Generation Library - El Forum - 12-11-2009 [eluser]dinhtrung[/eluser] @happydude: 1 . I once create a dynamic data field like you said. Here is the code: Code: /* File : controllers/mycontroller.php */ Code: /* File : views/form.php */ 3 . Not try the upload feature of Formgen once. Will give it a try later. Form Generation Library - El Forum - 12-11-2009 [eluser]happydude[/eluser] Thanks for your help man. That was greatly appreciated. Datamapper is an ORM library for CodeIgniter... probably the best, since there are many spawns of it now. The upload feature of formgen is really cool. It even has a special function iupload() for image upload. Give it a shot. You'll like it. BTW, the split() function you used breaks in PHP 5.3. I just get deprecated messages all over. This PHP 5.3 is something else. Its just breaking things all over the world. I'm gonna change it to explode() and see if it works. Form Generation Library - El Forum - 12-12-2009 [eluser]happydude[/eluser] Its not working at all now. I am running CI 1.7.2 on P|HP 5.3 and all I get now is a white screen of death. Any ides on what might be wrong? Form Generation Library - El Forum - 12-12-2009 [eluser]dinhtrung[/eluser] I gave it a test lastnight. Well, you can't use multiple upload dynamically or use uploadify with FormGen. Sorry about this. It is because every element in Formgen is automatically assigned an unique ID to check for various thing, like which is the last element user accessed, whether the form is submit or not. For upload element, the upload data is assigned back into $data that send to your model by the field name. Say, if you do: Code: $this->form->upload('userfile', "Upload, Please", 'allowed_types=pdf|zip,upload_path=/tmp/,max_size=4000'); Code: $data['userfile'] = array('full_path' => '/tmp/yourfilename.zip', 'file_name' => 'yourfilename', 'file_ext' => 'zip'...) I'll try to extend this feature as well. I'm in the need of it, too. Form Generation Library - El Forum - 12-13-2009 [eluser]CtheB[/eluser] Hi, i'm just starting with this form library. Must commit you've really put some effort into this, well done. I will give some comments here in this topic if i have some ideas or questions about the library. When i just start with an example, with only a name and password field, i'll get this exception: Code: Caught Exception The exception is for this line of code: Code: function _get_form_open() When i replace $action with $this->action, everything works oke. I'm using the 0.22 pre release version. |