Hi,
I would think using the full url for your stylesheets would correct the problem. Give that a try.
ginger
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
I am having a problem with Advanced Error Handling and any advice would be appreciated.
History.
I have multi domains on a single host and have set up formmail as follows for a single domain at present but with the wish to use it for other domains as well.
The root of the host domain is home1/gosynerg/public_html
(go-synergy.info)
Structures as follows:
home1/gosynerg/formmail/
Contains formmail.ini
home1/gosynerg/public_html/formmail
Contains formmail.php, fmbadhandler.php, verifyimg.php and imagewhy.html
home1/gosynerg/public_html/formmail/tplates
Contains the template files lg_goodmail.html, lg_badmail.html
home1/gosynerg/public_html/leapgroup
Contains the files for domain leapgroup.co.uk
The Problem
As yet I haven't yet set up the error handling completely(not yet using bad_template) but have run into a problem.
If I just click on the submit button without any fields completed fmbadhandler.php correctly displays a default page with a link back to the form, however the link loads the form incorrectly.
It loads the page ignoring any CSS files as it seems to believe that the domain in is fact go-synergy.info/formmail not leapgroup.co.uk. This is apparent by hovering over a menu link on the left.
If you could look at http://www.leapgroup.co.uk/contactnew.html and submit a blank form then return you will hopefully see what I mean.
The only places I actually use go-synergy.info/formail on my form is in the forms action field, bad_url and verifyimg
Many thanks
Hi,
I would think using the full url for your stylesheets would correct the problem. Give that a try.
ginger
You'll need to use full urls for the navigation links as well. Right now you have relative urls for stylesheet specifications and navigation, and since formmail.php and badhandler.php are on the gosynergy domain, all of the links are relative to that.
Use full urls for everything on your form page, and I think you'll be fine.
ginger
Thanks Ginger,
I did think I might have to do that, just hoped that there was a variable in formmail to do it for me. Anyway, the retun link is working fine now thanks for your help, now all I've got to do is get the badhandler displaying my fields and putting them back on my form so I might have to post again.
Tim
Okay,
Sorry about more questions but I think I must be missing something obvious.
good_template(lg_goodmail) working fine, re-populating form on error working fine but..
Nothing appears on the bad_template(lg_badmail) except the link back to the form. I'm using the samplebad until it's working - I just added some text to ensure it is picking up the correct html. The error email I get from def_alert tells me what was missed or incorrect on the form.
btw - if I remove the hidden field for bad_template the fmbadhandler.php basic error message gets it right.
What am I doing wrong?
If you need any code let me know.
Thanks.
Hi,
Did you set the $TARGET_URLS setting?
http://www.tectite.com/fmdoc/target_urls.php
Hi again,
Yes it's set thus
$TARGET_URLS = array("http://www.leapgroup.co.uk");
This is in the fmbadhandler.php NOT formmail.php
Last edited by timjohn; 26-Jan-2011 at 03:33 PM. Reason: Missed info
Hi it's me again,
Just noticed from your link that a trailing "/" needed so have added it and I've also added the Target_Urls to the formmail.php.
Sadly, the bad_template is still not showing any errors although everything else seems to be working fine. Odd![]()
Sorted it!
Lo and behold, when I read the Advanced Error Handling, there it stated that for the latest formmail use the format like this [fmfullerror /] but for v8.24 and prior to use the format like this <fmfullerror />.
Now here I made a mistake, I assumed (I hate that word) that the formmail I had downloaded would be the latest and therefore use the [, but no my version is 8.24 and uses the <.
So, changing my bad email html from [] to <> gives me just what I want.
Many thanks for your help,
Regards,
Tim
Good discovery! Thanks for sharing your solution. I haven't used the latest versions yet, but I'm sure others will benefit from your discovery.
ginger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks