Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Mar 29, 2011 @ 14:53
    Chris Houston
    0

    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

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Mar 29, 2011 @ 15:02
    Sebastiaan Janssen
    0

    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. ;-)

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Mar 29, 2011 @ 15:03
    Matt Brailsford
    0

    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

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Mar 29, 2011 @ 18:05
    Tim
    0

    +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.......

  • Probocop 51 posts 71 karma points
    Mar 30, 2011 @ 10:16
    Probocop
    0

    Yep, IFRAME is a good solution :)

Please Sign in or register to post replies

Write your reply to:

Draft