I'm having trouble finding any documents in relation to adding forms in thickbox. is there any examples on how to just all the form?

CommentFileSizeAuthor
#6 thickbox_form.patch1.51 KBfrjo

Comments

frjo’s picture

Category: task » support

You need a link with a thickbox class that points to a page that displays the form. You can have a look in the thickbox.modules file how it's done for the login form.

walker2238’s picture

Hey frjp thanks for the reply. I did try that before. However the results I got was that thickbox would display the entire page, not just the form.

caponey’s picture

i'm having the same issue...it displays the entire page, and we would just like the form to be displayed

caponey’s picture

i think we have to somehow use scripting to only show the fields we want in the thickbox.
hopefully a guru who loves to help the helpless will show us the way =)

walker2238’s picture

The solution or work around I use is just to create a page template. So say for the user profile edit page I'd create a page template and only have the content variable within that template.

frjo’s picture

Version: 5.x-2.0 » 6.x-1.x-dev
StatusFileSize
new1.51 KB

You need to look again how the thickbox.modules does for the login form.

1. Declare a menu item with a suitable path and callback.

2. Declare a menu callback that prints the form and exit.

The adventures can test the attached patch (for 6--1-dev) that adds function for opening arbitrary forms in a Thickbox.

With this patch you can construct links like this:

<a class="thickbox" href="/thickbox/form/user_register">open form in Thickbox</a>

The above link will open the form with id "user_register".