I can open a node that displays a webform block in a colorbox by using a colorbox class on the link. But when I submit the form, it does not stay in the colorbox (using webform option: "No redirect (reload current page)" selected). It opens the node displaying the webform.
It would be ideal to have additional option to either 1) stay with the popup or redirect to the original node where the colorbox link was first clicked.
Are there any clean solutions for displaying a webform in a popup?
Comments
An alternative method for hiding the form until needed is to use views accordion to display the webform. I am displaying a single form per view by filtering - so 1 click on the accordion bar opens the form up in the page. Submission with missing info, keeps focus on the form. Successful submission reloads the current page with the form submission message at the top of the page.
I'm not sure of a solution for your main question. It would need to refresh with ajax I think since the regular webform refreshes the page regardless of redirect. I don't think colorbox can handle that.
Maybe there's a contrib module in Drupal 7 that can be ported?
Maybe this would help: https://www.drupal.org/project/webform_ajax