title: CodeIgniter: How to reload the form when it is a function in the controller?
body: <p><strong>I can't seem to reload the form to see the error_messages</strong>. I have one function called index() and id() this is the method action which get's executed when the form button is pressed. Also I am using Datampper with it. I know it has form validation itself but I prefer codeigniter's form validations.</p>
  
  <pre><code>public function save_comments($article_id)
  {
      // Create object for comments
      $comments = new Comment_model();
  
      // Form Inputs &amp; DataMapper Validaiton
      $comments-&gt;name = $this-&gt;input-&gt;post('name');
      $comments-&gt;body = $this-&gt;input-&gt;post('body');
      $comments-&gt;article_id = $article_id;
  
      $this-&gt;form_validation-&gt;set_rules('name', 'Name', 'required');
      $this-&gt;form_validation-&gt;set_rules('body', 'Message', 'required');
  
      if ($this-&gt;form_validation-&gt;run() == FALSE)
      {
          //Something to reaload the form ?
      }
  
      else
      {
          $comments-&gt;save();
          redirect('article/id/'. $article_id);
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>Blockquote</p>
  </blockquote>