Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:25:52+00:00 2026-06-04T03:25:52+00:00

I have made a message form and comment form as blocks and embedded the

  • 0

I have made a message form and comment form as blocks and embedded the blocks in a view, whenever I submit the message / comment form, the page will redirect to the message / comment page.

This is code:

 $node = node_load($nid); // $nid contains the node id        
 $comment = new stdClass;
 $comment->nid = arg(2);
 $form = drupal_get_form('comment_node_project_form', $comment);
 print render($form);

How should I do to submit the form without redirecting ? on the $form variable ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:25:54+00:00Added an answer on June 4, 2026 at 3:25 am

    It sounds like you are either going to need $form_state[‘redirect’] (though in this case you may have to to have to unset it, since your form is already redirecting to a new page) or if you mean to say you don’t want to have the page refresh at all, you’ll need to ajax-ify your form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a php page that sends an email message with multiple attachments.
I have this submit button on my website. <form name=bbsform action=<?=$PHP_SELF?> method=post <input type=submit
I have made a form with the php code right under the html form
I have made an option page for my chrome application. Have designed the form
i have a form (made through codeigniter) that i want to submit with ajax
I have made an application using Java/Hibernate/MySQL, but whenever I try running it, it
I have made a simple Rails application that allows people to comment on posts.
I have an ASP PasswordRecovery module on a page, the code comes up like
Hope you all will be fine. The scenerio is I have a form on
Hey I have this code that sends an email with some data sent by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.