Freeform Thickbox Support & onSubmit Question
Posted: 12 February 2008 08:52 PM   [ Ignore ]
Newbie
Rank
Total Posts:  18
Joined  2007-01-22

I’ve got a dev site up here: http://www.sydneypackaging.com.au/index.php/products/details/napkins/

I might have over designed this - but I was hoping I could get Freeform to place nice with Thickbox.

If you click on the Enquire Now graphic it calls up the FreeForm Enquiry Form (http://www.sydneypackaging.com.au/index.php/products/enquiry) The links used to actually call it up so it displays nice in Thickbox is; “http://www.sydneypackaging.com.au/index.php/products/enquiry?height=500&width;=450” class="thickbox"

Thickbox has the ability to load new content into itself if you continue to use the Thickbox class - so as you can see as a bit of a test I have a link at the top and by clicking on that it loads up a new page within the thickbox.

The problem at the moment, obviously, is if that the submit button will call the EE validation - so I guess my first question is: is there a way to make the Freeform Submit button a HTML link that can be given a class?

I’ve tried using and . I’ve just been focussing on getting the submit to work on this page (v) first and then trying to get it to work with thickbox?

Can I use onSubmit to help me with this? Any other ideas?

I’m going to have LiveValidation on the forum as well (email field already has this) to hopefully I wont even hit the EE validation but I just want to make sure.

Profile
 
 
Posted: 12 February 2008 09:24 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  18
Joined  2007-01-22

I just found the tag name="nameoftheform"

Using that I can get the page to submit - although it wont work with Thickbox.

i think I might have to go back to a regular form page....

Profile
 
 
Posted: 13 February 2008 06:55 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Dane,

I was recently using Thickbox on a site with some other jQuery code I wrote. I needed to invoke Thickbox and open a Thickbox window inside one of my scripts. I downloaded the uncompressed version of Thickbox and looked at the functions inside. Once I got my head around the code I was able to invoke from my own scripts on whatever events I wanted to capture. I’d recommend trying that. I’m afraid I don’t have any code that I can share with you though.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 26 February 2008 04:06 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  18
Joined  2007-01-22

Hi Mitchell thanks for the reply.

I’m revisiting this issue as I’m finishing off the site.

http://www.sydneypackaging.com.au/index.php/products/details/napkins/

Click on the Enquire Now graphic.

I’ve got the freeform module working fine in my thickbox (with livevalidation as well) it’s jut working out the return section.

When I submit the form - the form is submitted fine and the email is sent (and recieved). I’m just trying to get the return path to show up in the thickbox now.

Should I still be looking in the thickbox source to try and make it called from the freeform submit event - or is there a way I can edit the Freeform code so that it can somehow add class=’thickbox’ to the return parameter (and hopefully that will cause it to load up in the window.

Any pointers would be great.

Profile
 
 
Posted: 26 February 2008 04:44 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  18
Joined  2007-01-22

maybe something to add.

Is it possible to just add

self.parent.tb_remove(); to the freeform_module_form_end

So that after the form is processed it closes the thickbox and the user is redirected to the return URL. I’m not too fussed if I can’t get the return URL to be displayed in the thickbox - I’d just like them to see the form submitted message somehow.

EDIT: forget the last two posts - thats what I get for picking up a project after a couple of weeks break - I had changed one of my template groups and it was working all along it was just displaying a white page after the form was submitted cause the return template didn’t exist.

All working now grin

Profile
 
 
Posted: 26 February 2008 06:35 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Dane,

You definitely want to be operating at the Thickbox level on this. There should be a parameter or a setting you can provide to the window opening routine that tells thickbox to refresh the window instead of the whole page.

mk

 Signature 

Mitchell Kimbrough

Profile