Welcome Guest, Not a member yet? Register   Sign In
Setting up Hidden field value with set_value
#1

[eluser]upstream[/eluser]
Hey guys

I have a hidden field where i store the record_id for updating. but once the user submit and the goes to validation process it seems that the hidden field's value is gone @__@ been checking this for hours now so i think i need a little help here.


The rules
Code:
public function _set_rules()
    {
        $rules = array(array('field'=>'customer_id','Customer','rules'=>'required|xss_clean'),
                       array('field'=>'customer_name','label'=>'Customer','rules'=>'trim|required|min_length[3]|max_length[100]|callback__name_check|xss_clean'),
                       array('field'=>'description','label'=>'Description','rules'=>'xss_clean'));  
        $this->form_validation->set_rules($rules);
        $this->form_validation->set_error_delimiters('<div>','</div>');
    }

The hidden field
Code:
&lt;input type="hidden" name="customer_id" value="&lt;?php echo set_value('customer_id'); ?&gt;" /&gt;

please help @__@
#2

[eluser]rogierb[/eluser]
What does print_r($_POST) say about the customer_id?
Is the hidden field filled?
#3

[eluser]OyoKooN[/eluser]
Hello,

I reply to this thread because I have the same problem.
When I print $_POST, I can see all my inputs.

In advance, thank you.




Theme © iAndrew 2016 - Forum software by © MyBB