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
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."
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.
It would be really nice if someone could WIKI this.
I think, thererfor I am! But what I am, and why...?
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."
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...
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."
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).