I have a webform (webform 3 module) embedded on my websites homepage. I was looking for a way to hide the webform after it has been submitted.

-> Tried to check the $_POST but that does not work -> Maybe the webform API could help?


  • I am using Drupal 6 – pal4life Jul 26 '11 at 22:36
  • Here is the scenario. There is a quiz that the user can take only after they have signed up with the above mentioned form. So I am working at the following functionality:- 1. First time Users to this page (Logged in or non logged in) sees the form to sign up for the event. After they sign up , they see the quiz. 2. Logged in users who have already signed up should only see the quiz and not the sign up form. 3. Anonymous (Non loggedin users) who have signed up should be able to directly take the quiz. For 1 and 2 , I am trying to see how to hide the webform? – pal4life Jul 27 '11 at 1:46

Do you want to allow users to submit it just once ?
If so have a look at node/123/webform/configure (where 123 is your form node id), there's a "Submission limit" option. If you choose "1" and "ever" then the form will be hidden with the following message: You have already submitted this form. View your previous submissions".

If you want to redirect your user to another page after submission, you can use the redirect option in the settings page.

Does this answer your question ? Can you elaborate it a little more if it doesn't answer it ?

| improve this answer | |
  • I will surely try out that configuration. Please do see the updated scenario information in my 2nd comment upwards for more clarity. Excuse me for not having added that before. Having the 'View Previous Submission' text may hide the quiz behind it. Hence I need a way to hide any instance of the webform after submission, to display the quiz. In VB terms (not a fan of vb but for clarity), Webform.visible=false, quiz.visible=true . :) – pal4life Jul 27 '11 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.