Form Generation Library |
[eluser]Mat-Moo[/eluser]
Check out the "Model" option -> http://frankmichel.de/formgenlib/user_gu...model.html Should have what you need
[eluser]score[/eluser]
EDIT: I created a model named check_email Code: <?php Code: <?php But im getting this error now.. A Database Error Occurred Error Number: 1054 Unknown column 'submit' in 'field list' INSERT INTO `invites` (`firstname`, `lastname`, `email`, `submit`) VALUES ('asd', 'asd', '[email protected]', 'Register') What have I done wrong?
[eluser]score[/eluser]
Managed to solve my problem. heres my function to check if the email exists in the database. Code: class Check_email extends Model {
[eluser]dinhtrung[/eluser]
Form Generation is such a great library! Save a lot of time to write form elements. But it'll be better if we can adjust it to generate various form structure. As of The art and science of CSS demonstrate, a form maybe like this: Code: <form> Code: <form> So, can we add more config elements to form config file, like: Code: $config['label_prefix'] = "<p>"; Code: <p><label>My Label</label><br> Also, when I use button() instead of submit(), I can't submit my form. I couldn't understand why. Although output_profiler show that there are POST variables, but the form didn't call the model method. I prefer button with type='submit' rather than just input type='submit' for more theme attributes.
[eluser]dinhtrung[/eluser]
I extend your class to populate data in one function, instead of all available fields. Code: function populate($values)
[eluser]macigniter[/eluser]
[quote author="Mat-Moo" date="1256237771"]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?[/quote] This will be addressed in the next update!
[eluser]macigniter[/eluser]
[quote author="hugle" date="1254830300"] 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![/quote] Great! You found the solution yourself The library does need a valid upload_path (if your upload is required or not) because in case someone does upload something the path must be set.
[eluser]macigniter[/eluser]
[quote author="hugle" date="1258466711"]Hello everyone again, I have found a little bug in Form library, I think, I'll explain: I have simple form: Code: print_r($_POST); &DEV;_0887& becomes &DEV;_0887& As you can see I'm not using any rules, but If I try to access $_POST before `if ($this->form->valid)` I have correct value = &DEV;_0887&. Even $_POST inside if ($this->form->valid) has malicous data = &DEV;_0887& I could not reproduce the bug... maybe some of you came to this problem? Thank you![/quote] I don't see a difference between &DEV;_0887& and &DEV;_0887& Am I missing something!?!?
[eluser]macigniter[/eluser]
[quote author="dinhtrung" date="1258841860"]Form Generation is such a great library! Save a lot of time to write form elements. [/quote] Thanks! I love to hear that :-) [quote author="dinhtrung" date="1258841860"] But it'll be better if we can adjust it to generate various form structure. [/quote] I agree! [quote author="dinhtrung" date="1258841860"] So, can we add more config elements to form config file, like: Code: $config['label_prefix'] = "<p>"; Looks good! I will try to add it asap... [quote author="dinhtrung" date="1258841860"] Also, when I use button() instead of submit(), I can't submit my form. I couldn't understand why. Although output_profiler show that there are POST variables, but the form didn't call the model method. I prefer button with type='submit' rather than just input type='submit' for more theme attributes.[/quote] This should work... did you find the solution?
[eluser]macigniter[/eluser]
[quote author="hugle" date="1255354846"]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[/quote] I fixed this. Will be included with the next update. I am just now going through all the latest posts here trying to fix all issues and then push out the next release by tomorrow (it's already late here in Germany). Thanks for your patience! |
Welcome Guest, Not a member yet? Register Sign In |