I have created a new webform, with two fields on it, one a request box and the second an email address field.

I have a link in the helper text of a cck form for this.

At present when a user clicks it it loads a new website page to display the form

Is there a way to create a smaller pop up equivalent with just the webform fields showing, which then closes upon submission?

Similar to that of ramui.com - http://ramui.com/ajax-popup-contact-form.html

Thanks

This is not really webform related which is why I have asked this in the general forum rather than the webform support

Comments

Anonymous’s picture

If you're using TinyMCE (I'm sure others are similar), you can click the "Pop Up" tab when creating the link. This will allow you to create a javascript popup window per your specifications.

susen’s picture

First i mention that I change my site url: http://ramui.com/.
I use redirect 301, but for benefit of viewers I request to jamesmcd please change my url.
To make self closing popup window upon submission read my article: http://ramui.com/articles/self-closing-popup-window.html

mdupont’s picture

Hi,
First, pop-ups displaying in a new window (like in your example) are bad, and often blocked by the browser. Use overlay pop-ups instead, they don't need to open another window.
For my website, I'm using webforms displayed in lightbox pop-ups (yes, lightbox can display nodes if you add "/lghtbox2" after the URL), it works perfectly. I let you refer to http://drupal.org/project/lightbox2

nlambert’s picture

Lightbox2 seems to redirect the user to the site home page after the form has been submitted. Have you managed to configure lightbox2 to self close and stay on the same page without refreshing?

jasom’s picture

Hi, here is link to my screencast called "Drupal webform module to lightbox popup for feedback" with all necessary code:
http://www.jasom.net/blog/drupal/drupal-webform-module-to-lightbox-popup...

Alternatively, you can watch it here:
http://blip.tv/file/4017499

wernerglinka’s picture

Displaying a webform in a lightbox is fairly simple. The tricky part comes when the user makes an error. Webform then loads the validation error messages in the page.tpl.php and that ruins the user experience. I guess the only way around this is to intercept the submit event to insure that webform never sees any errors, same for captcha. Would be interesting what other people have done about this.

f0ns’s picture

Webform Ajax Error handling will fix this issue

https://drupal.org/project/webform_ajax