Re: CKEditor and model validation

2013-04-16 Thread angel reyes
Thanks it works.

On Sunday, April 14, 2013 12:54:42 PM UTC-7, frederikjacques wrote:

 Hi Chris,

 I've written a blog post about this issue with sample code.
 You can read it here 
 http://blog.the-nerd.be/2013/04/add-ckeditor-to-cakephp-with-model-validation/

 Cheers,
 Frederik

 On Saturday, April 13, 2013 8:35:42 PM UTC+2, Chris wrote:

 hi frederik,... 
 I have a problem submitting with ckeditor,... this is my form,... but its 
 not passing content to controller,... 

 ?php echo $this-Html-script('ckeditor/ckeditor'); ?

 p style=display: block; font-size: 1.2em; text-align: left;
 ?php  echo $this-Form-textarea('content', array('rows' = '3', 'cols' 
 = '5', 'class' = 'ckeditor')); ?
 /p

 can you share with us please,... 
 thanks in advance 
 chris

 On Saturday, April 13, 2013 9:11:15 AM UTC-7, frederikjacques wrote:

 Hi all,

 I was wondering how you can use CKEditor and the model validation array.
 I got my textareas changed to CKEditors, but now my validation fails. 
 If I remove a rule like non-empty everything works again, but I would 
 rather keep my validation rules :-)

 Cheers,
 Frederik



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: CKEditor and model validation

2013-04-15 Thread Chris
hi frederik,... thank you for your reply,... 
however 'required' = false did not help me,... I have a validation rule 
set in a controller function: 

  if(empty($this-data))
  {
echo 'div class=clr/div';
echo 'div  style=font-size: 1.2em; font-weight: bold; margin: 
10px; auto 0 auto; text-align: center; color: red;';
 echo 'unexpected';
echo '/div';
echo 'div class=clr/div';
 $response = $this-requestAction('/photo_comments/ajax_show' .'/'. 
$photo['Photo']['id'], array('return'));
echo $response; 
die();
  }
  elseif(empty($this-data['PhotoComment']['content']))
  {
echo 'div class=clr/div';
echo 'div  style=font-size: 1.2em; font-weight: bold; margin: 
10px; auto 0 auto; text-align: center; color: red;';
 echo 'please fill in your comments';
echo '/div';
echo 'div class=clr/div';
 $response = $this-requestAction('/photo_comments/ajax_show' .'/'. 
$photo['Photo']['id'], array('return'));
echo $response; 
die();
  }

submitting data not getting thru,... getting response from echo 'please 
fill in your comments'; what that means is my data can't get thru,... 

thanks 
chris 


On Sunday, April 14, 2013 12:54:42 PM UTC-7, frederikjacques wrote:

 Hi Chris,

 I've written a blog post about this issue with sample code.
 You can read it here 
 http://blog.the-nerd.be/2013/04/add-ckeditor-to-cakephp-with-model-validation/

 Cheers,
 Frederik

 On Saturday, April 13, 2013 8:35:42 PM UTC+2, Chris wrote:

 hi frederik,... 
 I have a problem submitting with ckeditor,... this is my form,... but its 
 not passing content to controller,... 

 ?php echo $this-Html-script('ckeditor/ckeditor'); ?

 p style=display: block; font-size: 1.2em; text-align: left;
 ?php  echo $this-Form-textarea('content', array('rows' = '3', 'cols' 
 = '5', 'class' = 'ckeditor')); ?
 /p

 can you share with us please,... 
 thanks in advance 
 chris

 On Saturday, April 13, 2013 9:11:15 AM UTC-7, frederikjacques wrote:

 Hi all,

 I was wondering how you can use CKEditor and the model validation array.
 I got my textareas changed to CKEditors, but now my validation fails. 
 If I remove a rule like non-empty everything works again, but I would 
 rather keep my validation rules :-)

 Cheers,
 Frederik



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: CKEditor and model validation

2013-04-14 Thread frederikjacques
Hi Chris,

I've written a blog post about this issue with sample code.
You can read it 
here 
http://blog.the-nerd.be/2013/04/add-ckeditor-to-cakephp-with-model-validation/

Cheers,
Frederik

On Saturday, April 13, 2013 8:35:42 PM UTC+2, Chris wrote:

 hi frederik,... 
 I have a problem submitting with ckeditor,... this is my form,... but its 
 not passing content to controller,... 

 ?php echo $this-Html-script('ckeditor/ckeditor'); ?

 p style=display: block; font-size: 1.2em; text-align: left;
 ?php  echo $this-Form-textarea('content', array('rows' = '3', 'cols' 
 = '5', 'class' = 'ckeditor')); ?
 /p

 can you share with us please,... 
 thanks in advance 
 chris

 On Saturday, April 13, 2013 9:11:15 AM UTC-7, frederikjacques wrote:

 Hi all,

 I was wondering how you can use CKEditor and the model validation array.
 I got my textareas changed to CKEditors, but now my validation fails. 
 If I remove a rule like non-empty everything works again, but I would 
 rather keep my validation rules :-)

 Cheers,
 Frederik



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




CKEditor and model validation

2013-04-13 Thread frederikjacques
Hi all,

I was wondering how you can use CKEditor and the model validation array.
I got my textareas changed to CKEditors, but now my validation fails. 
If I remove a rule like non-empty everything works again, but I would 
rather keep my validation rules :-)

Cheers,
Frederik

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: CKEditor and model validation

2013-04-13 Thread Chris
hi frederik,... 
I have a problem submitting with ckeditor,... this is my form,... but its 
not passing content to controller,... 

?php echo $this-Html-script('ckeditor/ckeditor'); ?

p style=display: block; font-size: 1.2em; text-align: left;
?php  echo $this-Form-textarea('content', array('rows' = '3', 'cols' = 
'5', 'class' = 'ckeditor')); ?
/p

can you share with us please,... 
thanks in advance 
chris

On Saturday, April 13, 2013 9:11:15 AM UTC-7, frederikjacques wrote:

 Hi all,

 I was wondering how you can use CKEditor and the model validation array.
 I got my textareas changed to CKEditors, but now my validation fails. 
 If I remove a rule like non-empty everything works again, but I would 
 rather keep my validation rules :-)

 Cheers,
 Frederik


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.