how to comment individual image in popup form drupal 7? I have created view to display images and when I click on the image it gets displayed in pop-up form. I want to allow user to comment on image in pop-up form only so i have displayed comment form with php code. But its not working properly. It displaying preview button instead of comment. And when I click on preview it redirects to the image node page which should not be happened. I want it to work properly please help me suggesting solution. Hope image below will help you to understand what actually I have done.
First, in your content type edit page, make the "Preview Before Submit" option disabled or optional. Once you do that you will see the Submit button. 

Even you make the Submit button appear, the same will happen and user will be redirected to the actual page with no modal display. From the pattern of your modal window, I guess you are using colorbox plugin. If yes then you need to open this colorbox as an iframe option.

&lt;script&gt;
    $(function () {
        $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});    
    })
&lt;/script&gt;


So even you submit the page, the page will not be redirected outside of modal. 

EDIT #1 
Then I think you may have to alter the form you are using and check for form elements with a debug() function. Then I guess in your form_alter you can do the following,

&lt;?php
  function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    if (isset($form['type']) &amp;&amp; $form_id == 'mymodule_node_form') {
      // Hide the preview/submit button.
      $form['actions']['preview']['#access'] = FALSE;
  }
}
?&gt; 


Have a check on the variable that sets the preview, by 

variable_get('comment_preview_' . $node_type);


If it's set then can be disabled via,

variable_set('comment_preview_' . $node_type, DRUPAL_DISABLED);


I hope this will be helpful to your cause.