We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22098
    • 218 Posts
    Hello,

    we would like to create an slide out overlay-form (like a lightbox popup) with multiple pages. What would be the best way to implement this? Using standard snippets maybe?

    cheers, Olaf
      • 7923
      • 4,213 Posts
      Use Thickbox to open a MODx document what runs eForm that does multi-step form. There is a thread in eform forums what displays how to create multipage forms.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 33372
        • 1,611 Posts
        Yeh Thickbox is great for things like that. You can just create your multi-page form as regular MODx documents and load it into an Ajax Thickbox overlay. Very easy to implement and snazzy to boot.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 29076
          • 615 Posts
          It would be really nice if someone could WIKI this. laugh
            I think, thererfor I am! But what I am, and why...?
            • 7923
            • 4,213 Posts
            Quote from: ZAP at Mar 08, 2007, 12:04 PM

            Yeh Thickbox is great for things like that. You can just create your multi-page form as regular MODx documents and load it into an Ajax Thickbox overlay. Very easy to implement and snazzy to boot.
            Don’t have to be in multiple documents when using this: http://modxcms.com/forums/index.php/topic,8572.0.html

            Then just use the iframed content method to load that document in thickbox.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 33372
              • 1,611 Posts
              I forgot that your new multi-page form method keeps all the pages in one document.

              Is there some advantage to using the iframe method instead of the ajax method? I like to keep my forms on their own pages and load them in an ajax ThickBox. If you load them from an iframe I assume you’d want to hide it on the main page via CSS.

              I guess it’s just a matter of personal preference...
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 7923
                • 4,213 Posts
                I have never used Thickbox and just thought that iframe would be less trouble to set up.. Of course ajax would be better, but don’t know how that goes together with the eForm "multi-page" form. Wiki about this example would be nice though..


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 33372
                  • 1,611 Posts
                  Well both the iframe and Ajax methods do pretty much the same thing: load any content that you like into an overlay window (a modal).

                  With the iframe method the content that you load is actually in an iframe in the document from which you launched the ThickBox (it may be hidden or visible), which might be problematic if that content is dynamic (like a multi-page form). I haven’t tried that method, however, so I can’t say for sure (and I bet in a pinch it could be made to work one way or another). The Ajax method just seemed easier to me so I used that.

                  With the Ajax method you just reference the form in another MODx document and that content is loaded into the ThickBox modal. So this works pretty much the same as if you loaded the form as a regular page. The only difference that I’ve come across is that if you use JavaScript form validation or whatnot you may need to be more specific in your DOM references and avoid conflicts with the ThickBox script (and jQuery).
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options