Results 1 to 10 of 10

Thread: Help required with fmbadhandler.php reloading form.

  1. #1
    Join Date
    Jan 2011
    Posts
    12

    Default Help required with fmbadhandler.php reloading form.

    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

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Help required with fmbadhandler.php reloading form.

    Hi,

    I would think using the full url for your stylesheets would correct the problem. Give that a try.

    ginger

  3. #3
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Help required with fmbadhandler.php reloading form.

    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

  4. #4
    Join Date
    Jan 2011
    Posts
    12

    Default Re: Help required with fmbadhandler.php reloading form.

    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

  5. #5
    Join Date
    Jan 2011
    Posts
    12

    Default Re: Help required with fmbadhandler.php reloading form.

    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.

  6. #6
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Help required with fmbadhandler.php reloading form.

    Hi,

    Did you set the $TARGET_URLS setting?

    http://www.tectite.com/fmdoc/target_urls.php

  7. #7
    Join Date
    Jan 2011
    Posts
    12

    Default Re: Help required with fmbadhandler.php reloading form.

    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

  8. #8
    Join Date
    Jan 2011
    Posts
    12

    Default Re: Help required with fmbadhandler.php reloading form.

    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

  9. #9
    Join Date
    Jan 2011
    Posts
    12

    Default Re: Help required with fmbadhandler.php reloading form.

    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

  10. #10
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Help required with fmbadhandler.php reloading form.

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Required fields containing default text
    By tvulucy in forum FormMail Subscription Support
    Replies: 9
    Last Post: 08-Oct-2004, 09:26 PM
  2. Verifyimg.php on other form
    By crow in forum FormMail Subscription Support
    Replies: 1
    Last Post: 17-Sep-2004, 08:58 PM
  3. Required Fields not working?
    By zoe77 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 02-Jun-2004, 04:27 PM
  4. required field error
    By Ibis in forum FormMail Subscription Support
    Replies: 18
    Last Post: 02-Mar-2004, 09:04 AM
  5. required does not work ?!
    By flynst4r in forum FormMail Subscription Support
    Replies: 9
    Last Post: 26-Jan-2004, 09:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •