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?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
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 ?