Welcome Guest, Not a member yet? Register   Sign In
Using anchors in form URLs
#1

[eluser]Kenneth Vogt[/eluser]
It is a pretty common approach for a controller to both process a form and render the form. In other words, you will often see a controller that looks like this:

Code:
class Account extends CI_Controller
{
  function index()
  {
    $this->form_validation->set_rules('email', 'Email Address', 'required|valid_email');
    if ($this->form_validation->run() == TRUE)
    {
      redirect('home', 'refresh');
    }
    else
    {
      $this->load->view('account');
    }
  }
}

My form might be far down the account.php page however. So it would make sense for me to use an anchor tag so that I can reference the url as:

Code:
./account.php#my_form
However I don't see any way to do this with load->view(). How can I accomplish this?


Messages In This Thread
Using anchors in form URLs - by El Forum - 06-15-2012, 05:17 PM
Using anchors in form URLs - by El Forum - 06-15-2012, 05:28 PM
Using anchors in form URLs - by El Forum - 06-15-2012, 11:10 PM
Using anchors in form URLs - by El Forum - 06-16-2012, 08:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB