Welcome Guest, Not a member yet? Register   Sign In
AJAX questions
#3

[eluser]Carlos Mora[/eluser]
Thank you behdesign.
And yes, i'm using formtoch's controller/action,

Code:
function process() {

    $this->load->library("validation");

    $fields['nombre'] = 'nombre';
    $this->validation->set_fields($fields);

    $rules['nombre'] = 'trim|required';
    $this->validation->set_rules($rules);

    if ($this->validation->run() == FALSE) {
        $data = array(
            'nombre' => $this->validation->nombre_error,
                        'success' => FALSE
            );
        echo json_encode($data);
    } else {
        $data = array(
            'nombre' => $this->input->post("nombre")
            );
                $this->admin->insertRecord($data);
                $data['success'] = TRUE;


    }
}

I forgot that "...by default, the Form Validation class adds a paragraph tag (<p&gtWink around each error message shown. You can either change these delimiters globally or individually...."

Thanks again, you directed me to the solution,

Regards.


Messages In This Thread
AJAX questions - by El Forum - 04-26-2010, 11:01 AM
AJAX questions - by El Forum - 04-26-2010, 11:55 AM
AJAX questions - by El Forum - 04-26-2010, 01:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB