I'm using a custom form in CTools Modal to alter comment.
$form['subject'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $comment->subject,
);
$form['comment_body'] = array(
'#type' => 'text_format',
'#default_value' => $comment->comment_body['und'][0]['value']
);
All is good. I get my comment title and my comment body which is pushed in ckeditor field. My submit :
$comment = comment_load($form_state['values']['cid']);
$comment->comment_body['und'][0]['value'] = $form_state['values']['comment_body']['und'][0]['value'];
$comment->subject = $form_state['values']['title'];
comment_submit($comment);
comment_save($comment);
The subject is goodly saved from my form but for the body, it save an empty value.
Ps: when I change text_format
for textfield
, it work.