Is it possible to have multiple contour forms using lightbox pop ups?
Hi All,
We have a couple of lightbox popup windows using the JQuery lightbox, what we were hoping to do was to allow the pop up to have a contour form and for it to use AJAX to post the data and hence return a "thank you" message within the lightbox pop up.
From our tests so far, this does not seem possible so my questions are:
1) Is it possible to have multiple Contour forms on the same page ( as effectively they both exist within the page )
2) Can Contour post back using AJAX so that the response can be within the pop up lightbox, instead of refreshing the page?
If your lightbox solution supports iframes you can do it like that.
Contour out of the box doesn't do AJAX posts, my RestContour project does exactly what you want, have a look at the preview version, not the release version. The latest source code is available in the Contour Contrib source.
The RestContour project allows you to just build plain old HTML forms and posts them to Contour in an AJAX call, it also does some validation mapping so you only have to supply the validation in Contour itself. Be aware though that there is not HTML fallback, you have to have javascript turned on to use this. Then again, a lightbox will also require javascript, so that kind of guarantees that it won't be a problem. ;-)
I know it's not exactly answering your question, but couldn't you load an iframe into your lightbox and have it just load a page with a single contour form on? Then you are not restricted by the need to have everything on one page?
+1 on the iFrames, that's what we use, we just have simple page with just the form on that we open in an iFrame and that works fine, it also means less code on the pages if you need multiple forms.......
Is it possible to have multiple contour forms using lightbox pop ups?
Hi All,
We have a couple of lightbox popup windows using the JQuery lightbox, what we were hoping to do was to allow the pop up to have a contour form and for it to use AJAX to post the data and hence return a "thank you" message within the lightbox pop up.
From our tests so far, this does not seem possible so my questions are:
1) Is it possible to have multiple Contour forms on the same page ( as effectively they both exist within the page )
2) Can Contour post back using AJAX so that the response can be within the pop up lightbox, instead of refreshing the page?
Cheers,
Chris
If your lightbox solution supports iframes you can do it like that.
Contour out of the box doesn't do AJAX posts, my RestContour project does exactly what you want, have a look at the preview version, not the release version. The latest source code is available in the Contour Contrib source.
The RestContour project allows you to just build plain old HTML forms and posts them to Contour in an AJAX call, it also does some validation mapping so you only have to supply the validation in Contour itself. Be aware though that there is not HTML fallback, you have to have javascript turned on to use this. Then again, a lightbox will also require javascript, so that kind of guarantees that it won't be a problem. ;-)
I know it's not exactly answering your question, but couldn't you load an iframe into your lightbox and have it just load a page with a single contour form on? Then you are not restricted by the need to have everything on one page?
Matt
+1 on the iFrames, that's what we use, we just have simple page with just the form on that we open in an iFrame and that works fine, it also means less code on the pages if you need multiple forms.......
Yep, IFRAME is a good solution :)
is working on a reply...