Form Generation Library |
[eluser]jesusOmar[/eluser]
[quote author="Frank Rocco" date="1280969944"]I tried your demo login. Getting an error. A PHP Error was encountered Severity: Warning Message: call_user_func_array() expects parameter 2 to be array, string given Filename: libraries/Form.php Line Number: 1991[/quote] call_user_func_array expects and array as the second parameter, I am not very familiar with this but to fix it all I did was convert the string to an array: Code: $this->form->onsuccess('redirect', array('controller/action')); Hope this helps someone out and that the documentation or a fix is available soon. --jO
[eluser]jcq[/eluser]
What is the current status of the model() functionality in version 1.0.1? Even in simplified tests I am unable to get it to work. As best as I can tell, $this->model gets properly set when the function is called, but by the time that _load_model() is called, $this->model is null. This means that it fails this test (line 1952): Code: if ($this->_posted && count($this->model))
[eluser]seanloving[/eluser]
[quote author="jcq" date="1291331987"]What is the current status of the model() functionality in version 1.0.1? Even in simplified tests I am unable to get it to work. As best as I can tell, $this->model gets properly set when the function is called, but by the time that _load_model() is called, $this->model is null. This means that it fails this test (line 1952): Code: if ($this->_posted && count($this->model)) The ->model() method gets called after regular form validation is successful, including any callbacks. And validation happens automatically on submit (when a user clicks submit). Can you figure out where your validation fails? If it fails then ->model() never gets called SL
[eluser]seanloving[/eluser]
[quote author="jesusOmar" date="1284510853"] call_user_func_array expects and array as the second parameter, I am not very familiar with this but to fix it all I did was convert the string to an array: Code: $this->form->onsuccess('redirect', array('controller/action')); Hope this helps someone out and that the documentation or a fix is available soon. --jO[/quote] I fixed the "call_user_func_array expects and array as the second parameter" problem in similar way by adding one line of code shown below: old Code: else new Code: else I guess this is hacking. Am I supposed to "extend the library" or something? SL
[eluser]seanloving[/eluser]
->onsuccess($fcn, $url) works just fine when $fcn='redirect'. But what other functions can I use with ->onsuccess() ?? Where and how do I look in the Library to find out? Thanks SL
[eluser]darnold[/eluser]
Mac, Is there a way to put sections of the form in different places in the view? Here is an example: Let's say I have a page with tabs that I want to edit. Code: <form> This is a very scaled down example, but basically I want to keep most of the HTML out of my controller by having blocks like this: Code: $this->form This way I can split it up in my views! Is there any way to do what i'm thinking, am I approaching it incorrectly? Any thoughts would be appreciated! Thanks, David [Mod Edit:Edited in true content, Akismet false positive.]
[eluser]Cristian Gilè[/eluser]
If the model class is in a subfolder, the statement at line 1964 fails: Code: $this->CI->{$model['name']}->{$model['method']}($this, $model_data); because Code: {$model['name']} also includes the path, not only the model name. I suggest to insert this condition after the model loading (1962) Code: if (($last_slash = strrpos($model['name'], '/')) !== FALSE) so the _load_model() function becomes: Code: function _load_model() Hope this help somebody. Cheers
[eluser]Mantra of Doom[/eluser]
Great library! This will really help with my application which can get pretty form-heavy. I did run into an issue that I can't wrap my brain around, I'm sure I must be doing something wrong but I've looked over this code all day and can't figure it out. I use Ion Auth as my auth library and when trying to create or update users, I get this error: Quote:A Database Error Occurred time_zone is a dropdown list of timezones that was generated with codeigniter's date helper function timezone_menu(). Now that I am integrating this library though, I wasn't sure how to integrate timezone_menu into my registration form. I tried to work around it by just making my own select. If I don't change it from the default value, the form submits properly and writes to the database. If I change the timezone to a different value, the form gives the above error. Controller: Code: function register(){ Code: // Register the player
|
Welcome Guest, Not a member yet? Register Sign In |