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 - 05-17-2012 [eluser]sock[/eluser] Thanks for the suggestion, but I need to have a break after each label, not after the entire group. Would be nice to maybe even switch on the fly for 2 groups to have different config items applied to them within the same form (prefix/suffix). What I'm getting: Code: Please Select: [ ] Option A [ ] Option B [ ] Option C What I would like: Code: Please Select: And either change the label_suffix on a per form or per call basis. Think I'm just missing something. Form Generation Library - El Forum - 05-17-2012 [eluser]sock[/eluser] I'm sure the question I asked previously can be done through CSS, but I'm trying to avoid that (why? I don't know). One thought I had was, for example we have in our config/form.php: Code: $config['label_suffix'] = ''; If we added an argument (optional to not break previous code) to something like checkgroup: Code: From That would then override anything in the config file with what is supplied in the override string/array. Time to look in the libraries/Form.php I guess. Form Generation Library - El Forum - 06-06-2012 [eluser]Michael L.[/eluser] I have there problems too. Need to wrap lable and input-radios into a UL with LI elements UL LI INPUT radio LABLE /LI ... /UL i tryed changes in the config and there ist some bug with the pre and suffixes Code: $config['group_prefix'] = ''; // wraps around checkgroups and radiogroups i'm getting this. it look like the suffix is missing every time Code: <form action="http://ci/index.php/signup" accept-charset="utf-8" class="formee" name="signup_step1" id="signup_step1" method="post"><div><fieldset> Form Generation Library - El Forum - 06-25-2012 [eluser]macigniter[/eluser] Quote:New version 2.0.2 available! Form Generation Library - El Forum - 06-26-2012 [eluser]paulo_cv[/eluser] I have a question about this great code, I hope somebody can help me. I read the user guide but couldn't find anything related. I have one field with two validations: ->text('nombre', 'Nombre' ,'required|numeric') I would like to set custom error messages for each one of these validations, based on a couple of tests that I did I assume that if I set two set_error lines they will be assigned in the same order as in the assignment above: ->set_error('nombre', 'The field is required, please enter a value') ->set_error('nombre', 'Only numbers are allowed') The assumption that I made about the order of the messages seems to work ok but I'd like clarification if that is how it's supposed to be done. And the second "issue" is that if I try to submit the form without populating a value the numeric validation kicks in instead of the required. In other words if I click on Submit without a value the error message will be "Only numbers are allowed" instead of "The field is required ..." Any help will be greatly appreciated. Form Generation Library - El Forum - 06-27-2012 [eluser]gmatkowski[/eluser] Hi, i have a small problem with this library, the thing is: I have two forms on one page, no matter what i do (changing text fields names, form names etc.) after submiting form the library validates both forms and throw errors ... can anyone tell why this is happening ? Forms have different names, even submit buttons have. Code: public function regForm() Form Generation Library - El Forum - 06-27-2012 [eluser]gmatkowski[/eluser] Problem solved ... fields names cannot be doubled, no matter what (forms names, buttons names) ... Form Generation Library - El Forum - 06-27-2012 [eluser]paulo_cv[/eluser] I have decided to delete the set_error lines and customize the general error messages in the language packs. Form Generation Library - El Forum - 07-06-2012 [eluser]Unknown[/eluser] Small bug, bugging me for days. Hidden form field doesn't get an ID, even with nameasid set. I can't figure out where it's lost. On visible fields, id is created correctly. TIA. Form Generation Library - El Forum - 07-28-2012 [eluser]drewbee[/eluser] Hi. When the value of $config['error_class'] = ''; (an empty string), the following error on the form is thrown: A PHP Error was encountered Severity: Notice Message: Undefined property: El::$error_class Filename: libraries/Form.php Line Number: 533 Backtrace: File: C:\wamp\www\public\tutorialhivemind\www\application\libraries\Form.php Line: 533 Function: _exception_handler File: \libraries\Form.php Line: 611 Function: _make_label File: \libraries\Form.php Line: 794 Function: password File: \libraries\Form.php Line: 2204 Function: get File: \libraries\Form.php Line: 1562 Function: _elements_to_string |