Results 1 to 10 of 10

Thread: Can you edit default MSG_THANKS_PAGE?

  1. #1
    Join Date
    Oct 2006
    Posts
    11

    Question Can you edit default MSG_THANKS_PAGE?

    One more question..

    On one of my forms, I have to redirect the user based on a selection in the form. I had serious trouble with doing that, but finally got it to work by adding a small snippet of php at the very end of the script. When I test my page and submit the form, I see this default MSG_THANKS_PAGE for about 2 seconds, then my redirect works.

    I was wondering is there a way to bypass this or edit the default message in this instance?

    Here's the snippet I added...

    if($_REQUEST['redirect']){
    print "<meta http-equiv='refresh' content='0; url={$_REQUEST[redirect]}'>";
    }

    Thanks!

    Karen

  2. #2
    Join Date
    Jun 2006
    Posts
    214

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Use fmbadhandler.php with a template for the reply that will replace the default page.

    Then add the following hidden field to your form. My good url template in this was feedback.tpl
    HTML Code:
    <input type="hidden" name="good_template" value="feedback.tpl" />

  3. #3
    Join Date
    Oct 2006
    Posts
    11

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Thank you, will try that. I stumbled upon another question if you don't mind?

    I have a few differently named copies of this script running on my site. They all work fine, but on one of them, I only get the comments printed on the email. On the exact other forms, I get realname, email, etc. Am I missing something?

    <FORM METHOD="POST" ACTION="http://www.mysite.com/php/contact.php">
    <input type=
    "hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
    <input type=
    "hidden" name="recipients" value="support@mysite.com">
    <input type=hidden name=
    "subject" value="Help Form">
    <input type=hidden name=
    "required" value="realname,email,comments">

  4. #4
    Join Date
    Jun 2006
    Posts
    214

    Default Re: Can you edit default MSG_THANKS_PAGE?

    If you are not getting the required fields could it be that the form is rejected and what you are receiving is the error message with partial submited info?

    I use the same formmail.php and fmbadhandler.php for all my forms. Each form has three templates. Good, bad, and mail templates. I use the formamil.ini file for the recipient. Nobody is posting in the sample form section so I will do so with a form and three templates that go with it. Maybe some of that will be helpful to you or others.

  5. #5
    Join Date
    Oct 2006
    Posts
    11

    Default Re: Can you edit default MSG_THANKS_PAGE?

    I guess I better stick to one problem at a time...LOL

    As far as the default MSG_THANKS_PAGE goes, I checked out fmbadhandler.php and I don't think it will work for *this* specific problem. I tried using good_url in my form, and it overrides my..

    if($_REQUEST['redirect']){
    print "<meta http-equiv='refresh' content='0; url={$_REQUEST[redirect]}'>";
    }

    snippet that makes this particular form work correctly for me. That's why I was hoping I could just edit the parts of the actual php that it refers to....

    define('MSG_THANKS_PAGE',105); // Thanks! We've received your....
    or..
    $aMessages[MSG_THANKS_PAGE] = 'Thanks! We\'ve received your information '.
    'and, if it\'s appropriate, we\'ll be in '.
    'contact with you soon.';

    When I try to edit those, I get error messages, but I could be doing it wrong, since my knowledge of php is far from good. LOL....Is there a correct way to edit the above references, without getting error messages?

    Thanks a billion!

    Karen

  6. #6
    Join Date
    Oct 2006
    Posts
    11

    Unhappy Re: Can you edit default MSG_THANKS_PAGE?

    Hello

    Checking back in. I'm still having problems with my above post. I really would like to know how I can remove the default MSG_THANKS_PAGE message part of FormMail. It's a wonderful feature that is very useful on my other forms, but this one particular form, I need it gone Any ideas?

  7. #7
    Join Date
    Oct 2006
    Posts
    11

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Nevermind. I just commented it out. I do get an alert every time the form is submitted, but I'll either just deal with it, or turn alerts off for this form.

    Thanks!

  8. #8
    Join Date
    Nov 2006
    Posts
    8

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Karen,

    I was able to go into the base .php formmail program and change the wording on the default error page. So I am pretty sure you can change things around if you want but you'd have to be very careful. I believe the members of this forum would prefer that you just use the stock solution, I agree with that philosophy and it's a good one but sometimes we just need a quick and dirty solution, in my case I simply added a few instructional words of my own choosing to the error page.

    I know this doesn't answer your question but if you're willing to dig and learn anything is possible.

    Gary

  9. #9
    Join Date
    May 2007
    Posts
    2

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Quote Originally Posted by tsk928
    One more question..

    On one of my forms, I have to redirect the user based on a selection in the form. I had serious trouble with doing that, but finally got it to work by adding a small snippet of php at the very end of the script. When I test my page and submit the form, I see this default MSG_THANKS_PAGE for about 2 seconds, then my redirect works.

    I was wondering is there a way to bypass this or edit the default message in this instance?

    Here's the snippet I added...

    if($_REQUEST['redirect']){
    print "<meta http-equiv='refresh' content='0; url={$_REQUEST[redirect]}'>";
    }

    Thanks!

    Karen
    Hi Karen,

    I used your snippet by putting it in the end of the formmail file.
    I also removed the THANKYOU-text after the MSG_THANKS_PAGE remark in the language.inc file (not the formmail file!), and now after submitting a form it shows the msg_thanks_page as a blac page for a millisecond and then my thankyou page asap.

    Best regards,
    Sunadumari

  10. #10
    Join Date
    Aug 2007
    Posts
    10

    Default Re: Can you edit default MSG_THANKS_PAGE?

    Quote Originally Posted by sunadumari
    Hi Karen,

    I used your snippet by putting it in the end of the formmail file.
    I also removed the THANKYOU-text after the MSG_THANKS_PAGE remark in the language.inc file (not the formmail file!), and now after submitting a form it shows the msg_thanks_page as a blac page for a millisecond and then my thankyou page asap.

    Best regards,
    Sunadumari
    where does one find the language.inc file?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Script breaks if I edit anything.
    By jeremed in forum Community Support
    Replies: 4
    Last Post: 15-May-2007, 07:34 AM
  2. Edit where email is received from
    By sisandi in forum Community Support
    Replies: 4
    Last Post: 17-Apr-2007, 09:07 PM
  3. Select Field Default Not Working
    By uniopp in forum Bug Reports
    Replies: 3
    Last Post: 07-Mar-2007, 04:47 AM
  4. Default Values and Form Templates
    By scottdog129 in forum Community Support
    Replies: 1
    Last Post: 06-Feb-2007, 08:02 AM
  5. Required fields containing default text
    By tvulucy in forum FormMail Subscription Support
    Replies: 9
    Last Post: 08-Oct-2004, 09:26 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
  •