Welcome Guest, Not a member yet? Register   Sign In
fckeditor validation
#1

[eluser]dimis[/eluser]
I have a problem with fckeditor (the old version) and validation.
I want to be requiredput validation is passed
I tested all these but it does not work
Code:
....$this->load->library('form_validation');
        $this->form_validation->set_rules('cart_name', 'name', 'required');
$this->form_validation->set_rules('FCKEDITOR1', 'description', 'required');
$this->form_validation->set_rules('FCKEDITOR2', 'text', 'required');      
        if ($this->form_validation->run() == FALSE || !isset($_POST['FCKEDITOR2']) || !isset($_POST['FCKEDITOR1']) ||   strlen(trim($_POST['FCKEDITOR1']))==0 || strlen(trim($_POST['FCKEDITOR2']))==0)...
#2

[eluser]theprodigy[/eluser]
try print_r()-ing your fckeditor posted values and see what is in them.

Code:
print_r($_POST['FCKEDITOR1']);
print_r($_POST['FCKEDITOR2']);

or

Code:
print_r($this->input->post('FCKEDITOR1'));
print_r($this->input->post('FCKEDITOR2'));


it may be sending some extra data with it that you just can't see.
#3

[eluser]dimis[/eluser]
I just notice that there is a [quote& # 160;[/quote] at the editor so it has a value!




Theme © iAndrew 2016 - Forum software by © MyBB