Hi,
I'm adding a comment form at a views.tpl by:
$block['content'] = drupal_get_form('comment_form', array('nid' => $node->nid));
print $block['content'];
the comment form is working fine, but without ajax. This the form html:
form class="ajax-form ajax-form" id="comment-form" method="post" accept-charset="UTF-8" action="/ferrero/comment/reply/7"
After clicking the submit button i get a redirect to the form action page.
this is the submit button html:
input type="submit" class="form-submit ajax-trigger" value="Submit" id="edit-submit" name="op"
when i click the submit, the value changes to "loading...".
If the comment textarea is empty, i get the div error message by ajax, but if the textarea has text and i click on submit, i get redirected to theform action page.
Any reason why? How should i solve this?
Thanks.
PS: print comment_form_box(array('nid' => $node->nid)); doesn't work with ajax either
Comments
Comment #1
carvalhar commentedfound i solution *easily*, ok my fault.
I just had to enable the sub module disable redirect and then set it at ajax/settings ui page.
thanks
Comment #2
brendoncrawford commented