function comment_form_submit_build_comment
Updates the form state's comment entity by processing this submission's values.
This is the default builder function for the comment form. It is called during the "Save" and "Preview" submit handlers to retrieve the entity to save or preview. This function can also be called by a "Next" button of a wizard to update the form state's entity with the current step's values before proceeding to the next step.
See also
2 calls to comment_form_submit_build_comment()
- comment_form_build_preview in modules/
comment/ comment.module - Build a preview from submitted form values.
- comment_form_submit in modules/
comment/ comment.module - Process comment form submissions; prepare the comment, store it, and set a redirection target.
File
-
modules/
comment/ comment.module, line 2243
Code
function comment_form_submit_build_comment($form, &$form_state) {
$comment = $form_state['comment'];
entity_form_submit_build_entity('comment', $comment, $form, $form_state);
comment_submit($comment);
return $comment;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.