Results 1 to 1 of 1

Thread: If your return link on your custom error page isn't working using fmbadhandler ...

  1. #1
    Join Date
    Nov 2011
    Posts
    8

    Default If your return link on your custom error page isn't working using fmbadhandler ...

    After a couple of frustrating days of setting up fmbadhandler and finally getting it to work using bits and pieces from multiple posts on the forum, I'm posting with what I've learned so that others searching the forum may get more than one answer in just one place.

    First and foremost, if you are setting up validation, make sure all of your field names do not have spaces. For example: name="first name" is no good. It must be either name="firstname" or name="first_name". If after using the return link, you're finding that the form has not saved the data, one reason could be that there are field names with spaces. So check that. Also, don't start the name with a number.

    If you're using the sample template and the commands are showing up on the error page rather than displaying the errors then you're using the version that requires you to change all [ and ] to < and >. Change them and it should work.
    Is your error page showing only unsupplied values for your field name such as "Phonenumber" instead of a message like "Hey dummy, you left out the phone number"? If so, you need to edit the required fields line to your ini file (or your form IF and only IF you are not using an ini file)
    It needs to read Phonenumber:Hey Dummy you left out the phone number
    Do not use any special characters. Use the : in between the field name and your "hey dummy" message. Separate with commas

    Are you getting a 404 error when using your return link or is the return link not even showing up? Try these things:
    1.) Make sure on your form bad_template is your filename only. Leave out the complete url. Example: value=errorpage.html is good. value=http://mysite.net/somefolder/errorpage.html is baaaaad.
    2.) On the fmbadhandler file, $targetURLS array should be set your actual home URL. ex. http://www.yoursite.net DO NOT use the https://secure.yoursite.net that is in the example unless you actually have such a url. You might also include the url without the "www"
    in addition.
    3.) $TEMPLATEDIR requires a file path and NOT a url. For example, if your error page is located in www/somefolder you will need to enter in something that looks like this: /home/YourHostingAccountUsername/public_html/somefolder (leave off last "/") The good news is if you're not sure about your path, you can easily find out by running this test alert message. In a browser window, type in www.yoursite.net/somefolder/formmail.php?testalert=1
    and it will send you a message. At the bottom of the message it will give you the path. Remember to add the folder name it's in to the end of that.

    4.)$TEMPLATEURL (not to be confused with $TEMPLATEURLS) is the location of your custom error page (referred to on here as bad template but it doesn't have to be a TPL file or anything like that) And example of this would be : http://www.yoursite.net/somefolder/errorpage.php

    5.) Make sure your Name tag comes first in your form file and that values are specified except when there is no value such as textareas. Textareas don't need a value.
    .
    .
    .

    Sometimes I feel like I need to contribute. It's a great script and I've found it to be very user friendly. I just had trouble with the badhandler setup. If others find this, hopefully it will save them hours or days of frustration. No replies necessary as I got mine working.
    Last edited by teccet10; 30-Nov-2011 at 02:20 PM. Reason: formatting a little messed up

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. fmbadhandler.php return to link not working
    By trinsic in forum Community Support
    Replies: 1
    Last Post: 20-May-2011, 03:31 PM
  2. fmbadhandler and return link not working
    By dc_sava in forum Community Support
    Replies: 8
    Last Post: 23-Dec-2008, 05:03 AM
  3. Return link not working!! Getting Error Page
    By geojohn in forum Community Support
    Replies: 1
    Last Post: 31-Dec-2006, 06:09 AM
  4. fmbadhandler - placement of return link on error page
    By kitkatdev in forum Community Support
    Replies: 1
    Last Post: 14-Jun-2006, 06:22 PM

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
  •