Codeigniter, HMVC, Ion_Auth and AjaxForm problem Programming Web Development by cgull … a site with Codeigniter 2.1.3 I am using HMVC to create ion_auth modules. I am trying to separate my… have a few problems: Problem One: I read through the HMVC documentation and added these lines to the MY_Controller file: $this… Re: Codeigniter, HMVC, Ion_Auth and AjaxForm problem Programming Web Development by veedeoo …, it is the view causing the problem, because it is HMVC where the view is restricted to just following whatever the… Re: Codeigniter, HMVC, Ion_Auth and AjaxForm problem Programming Web Development by cgull Managed to solve the problem, it was a mistake in the login form: `echo form_open(site_url('auth/login', $attr);` Should be: `echo form_open(site_url('auth/login'), $attr);` Re: Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by veedeoo …limit, then the application will fail. In HMVC design pattern, the application's separation of concerns…e10714081f3a8d805a91412e306549eb.png "e10714081f3a8d805a91412e306549eb") By implementing HMVC design patterns to the above basic MVC triad,…template compiler. If you want to experiment with HMVC for CI, you can download [this](https… Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by veedeoo … it is one of the only two frameworks that are HMVC (Hierarchical model–view–controller ). So, if you want to …the underdog. **How does the regular MVC framework compared to HMVC?** The answer is simple. If you think CI can still… provide upgrade, CI will look like a Dinasour compared to HMVC like the FuelPHP. **Things I don't Like About Framework… Re: Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by veedeoo …alleviate the stress load, we can rewrite the application to HMVC pattern, by creating more sub-modules relevant to login, … are served depending on the purpose of their visit. HMVC design pattern is really easy to remember. All we …view and model being in the bottom. If per requirements HMVC is required by specific application, then we will just … Re: Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by iamthwee … great explanation. So effectively what you are saying is that HMVC allows the controllers to be further separated allowing more fine… add another level of abstraction. Can you explain how, using HMVC, you manage to keep the flow clear in your head… Re: Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by iamthwee v can you further explain the differences between hmvc and mvc? Second, you talk about moving onto newer frameworks. … Re: Part Two: PHP MVC Framework , Template Files For TBS and Smarty Programming Web Development by iamthwee … effect without having to divide the controller up with the HMVC pattern? At the moment this is what I am doing… Creating an event in google calendar with ci 2.1.4 Programming Web Development by cgull …. Also installing sparks and getting the loader to work with HMVC broke the whole site. Can someone please help me? I… Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull Hello, I am developing a site with CI 2.1.3 I have a blog module, in this blog I have a form to post a comment. I am calling this form inside a view with: `echo Modules:: run('blog/comment');` When I submit this form with ajaxForm, or refresh the page, the values of the input fields are not being cleared. My controller’s function for the … Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal What it does `$this->data['new_comment'] = $this->blog_comment_m->get_new();` ? I see it's used in two cases: 1. GET request, no form submit; 2. and when validation is true, rewriting a previous setting of `$this->data['new_comment']`. In the first case the objects should return null/false, so that the default value for `set_value('… Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull Hi cereal, What it does is creating an object with the input fields and setting their values to blanks. Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal Ok, the problem is that `set_value()` doesn't consider if the validation runs true or false, usually you `redirect()` and so the POST array is resetted automatically, here we can force this action by extending `/system/libraries/Form_validation.php`, create `/application/libraries/MY_Form_validation.php` and paste this: <?php if ( ! defined… Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull cereal you're a STAR !!!! I've been struggling with this problem for days, posted about it all over the world, your solution sloved the problem. I can't thank you enough !!! THANK YOU ! :) Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal You're welcome, if we are done, please mark it solved, it will be useful to others :) Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull Ok, I still have a problem, when I refresh the page, after submitting the form, the values are back in the input fields.... any idea how to fix that as well? Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal Can you explain better the problem? I've created a test with **ajaxForm** and it's working fine, here's the code: #The Controller# <?php class Test extends CI_Controller { protected $data; public function __construct() { parent::__construct(); } public function index()… Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull Hi cereal, Sorry, I wasn't on my comupter the whole day. My problem is that I submit the form successfuly. The input fields are cleared. Then I refresh the page, and the input fields have the values that I submitted in them again. I will look at your code deeper tomorrow as I can't do it now. Looked at it quickly and it is a bit different than … Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull Just one more thing, the strangest thing is, after I refresh the page, I look at the page source and the fields values are equal ''. For example: <div class="control-group "> <label>Name *</label> <input type="text" name="author" value="" class="input-large&… Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal Do you get the same effect with different browsers? I can think to an autofill issue here, if you're using HTML5 you can avoid it by adding `autocomplete="off"` to the input fields. Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull cereal, you found it! autocomplete, solved the problem. I tested it on Chrome and it was fine without the autocomplete, but firefox needed it. I just don't understand why does it happen only on this form and not on other forms in my app. WOW, thank you very much. Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cereal You're welcome! :) The problem is given by Firefox Form Manager, if in the form there are the words **Name** and/or **Address** (and variants) [it will try to autocomplete it.](https://developer.mozilla.org/en-US/docs/Mozilla/How_to_Turn_Off_Form_Autocompletion#Exceptions_and_Recommended_Workarounds) Re: Codeigniter HMVC module form does not clear input fields on submit Programming Web Development by cgull And I used to love Firefox.... lol Re: Separating front-end and back-end using codeigniter Programming Web Development by Robert Rusu Try this https://github.com/rusuandreirobert/codeigniter-startup It uses HMVC. Basically HMVC gives you a structure rather the normal one in codeigniter…. CI has controller/action . HMVC CI has module/controller/action . And in HMVC you'll have admin & front :). You… Re: How to Improve Test Program on Classes? Programming Web Development by jkon … I didn't even touched what HMVC is and surely none of the examples used HMVC. To explain you what is , I… this has nothing to do with what you are saying , HMVC involves the ability of a Controller (or in some implementation… Model and View classes needed has nothing to do with HMVC. > I have come accross PHP examples which use 'echo… Re: MVC pattern Programming Web Development by veedeoo … frameworks work. **My thoughts and opinions about Hierarchical MVC or HMVC as shown on my diagram above :** Kohana framework slowly evolved…. Any MVC design patterns fanatic can truly admire the HMVC design patterns. HMVC does not overload the main controller, but rather it… Re: CodeIgniter Storing Image using Blob Programming Web Development by veedeoo …, I am not too lazy today. Here is the HMVC design diagram as it applies to Codeigniter functioning as… HMVC framework. It is not like the Kohana or Fuel PHP…on my typing speed :). Unlike the conventional MVC pattern, the HMVC pattern in this particular framework isolates the modules, making them… Re: CI error Programming Web Development by cereal …/welcome http://localhost/admin.php/welcome Another alternative is the HMVC approach, but I haven't tested with CI 3.*, for… Re: Mvc pattern vs Framework Programming Web Development by dany12 Yes most frameworks are mvc(Model-View-Controller) based or hmvc(Hierarchical model–view–controller). So does the mvc pattern for a cms should we say ,be a good ideea or using a framework is a better approach?