I've found an easy way to implement this feature without coding that works for me:
- you can enable webforms as a block --> select the webform content you created, tab "Webform" > "Form Settings" > "Enable as a block"
- put the block inside a region, I've put mine in the footer region
- CSS style the footer webform block as "display: none;"
- for colorbox: in "configuration", "Media", "Colorbox" --> advanced settings, activate "Enable Colorbox inline"
- add this as the html code for opening the colorbox webform link:
<a class="colorbox-inline" href="?width=310&height=460&inline=true#name-of-your-block">
Hi am following ur steps..but when i click on image i have given link as you mentioned.but it displaying blank colorbox.how to fix it?
ReplyDeletethere is nothing show in colorbox
ReplyDeleteI also get a blank. I have tried a lightbox but this shows the whole page. It seems that there is only 1 or 2 option for webforms
ReplyDeletethanks for help. you save me a lot of time.
ReplyDeleteHi
ReplyDeletethanks but what does name-of-your-block stands for ??
is it for block class, Id, title or something else.
pls reply
what if i am using lightbox2?
ReplyDeleteHello.
ReplyDeleteThis solutions, how published "step by step" not working! Because we hide webform block (3 step), when we call colorbox - i see empty block (webform has display:none).
But this very very light fixed - add in css other rules -
#cboxLoadedContent #block-webform-client-block-7 {
display:block;
}
do not forget change block name!!!
Evgeniy.