Can anyone spot why my form always fails the validation? The validation doesn't output any errors, and the POST array is always empty. Suggests to me, its getting submitted to the wrong place but thats not the case.
<form action="https://www.mydomain.com/account/withdraw" method="post" accept-charset="utf-8"> <fieldset class="six-col">
<h3>What amount?</h3>
<span style="font-size:1.3em;position:relative;display:inline;">£</span>
<input id="amount" type="text" placeholder="1.00" style="font-size:1.3em;width:115px;background-color: transparent;color:white;"/>
</fieldset>
<fieldset class="six-col">
<h3>Charges</h3>
<span id="charges" style="font-size:1.3em;"></span>
</fieldset>
<fieldset class="six-col">
<h3>You leave with</h3>
<span id="charges2" style="font-size:1.3em;"></span>
</fieldset>
<fieldset class="six-col end-col">
<input type="submit" id="submit" class="btn" value="Withdraw" style="width:125px;position:absolute;bottom:0" />
</fieldset>
</form>
Here is the controller
$this->load->library('form_validation');
$this->form_validation->set_rules('amount', 'Amount', 'required|xss_clean|trim|numeric|max_length[5]');
if ($this->form_validation->run() == FALSE)
{
$this->load->helper(array('form', 'url'));
$data['credit'] = $this->account_m->get_credit();
$this->load->view('account/withdraw', $data);
}
else
{
// The withdraw code
}
$this->load->view('footer');
Thanks for any help