+ Reply to Thread
Results 1 to 4 of 4

Thread: Passing Hidden Variables

  1. #1
    Join Date
    Aug 2007
    Posts
    23

    Default Passing Hidden Variables

    I a am starting with an html page that passes two hidden variables (Make and Model) to a php form page using "POST".

    On the php form page the hidden variables fill in two separate text boxes using the following code: <?php echo $HiddenVariable; ?> and also print out on the page elsewhere on the page.

    On the php form page the user completes the form.
    The php form is submitted to formmail.php to be processed.

    My problem is that the variables Make and Model do not print out on the good_url-tmpl.html page nor on the the tmpl.txt page.

    Is it possible to do so?

    By the way I am running a number of forms sucessfully using formmail.php on ths ame web site. They all submit directly from an html page to formmail.php and all works well.

    Thanks,

    marzi

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

    Default Re: Passing Hidden Variables

    Hi,

    Do you have a url that you can post ... or the complete form code? (I'm referring to the form that's submitted to formmail.php.)

    Did you "name" the text fields that you dynamically provided a value for in the form that posts to formmail.php? Did you use that exact field name in your template?

    ginger
    Last edited by ginger23; 14-Jul-2008 at 08:56 PM. Reason: Did you name text fields and use same name in template?

  3. #3
    Join Date
    Aug 2007
    Posts
    23

    Default Re: Passing Hidden Variables

    If you want to try it start here and clikc on the Request Quote button.
    http://www.antenen.com/htdocs/AA-quote/test1.htm

    I got the sequence to work finally by changing the extension of my good_url template to "php" and also embedding the two variables being passed along the way in the template file.
    <input type="hidden" name="Make" value="<?php echo $Make; ?>">
    <input type="hidden" name="Model" value="<?php echo $Model; ?>">
    Thanks for offering to take a look and reaching out a helping hand.

  4. #4
    Join Date
    May 2008
    Posts
    1,274

    Default Re: Passing Hidden Variables

    Hi,

    I don't think you should have to give the template a php extension. The values should be passed to formmail.php as long as they're in the form that's posting to formmail.php. Were the other fields available to the template before renaming with a php extension?

    One thing I did notice is that you have the fields twice, once as a hidden field and then as a text field. Why twice? Anyway, you're missing a quotation mark before the value in the text input fields. This is what you have:

    Code:
    name=Make"
    name=Model"
    That might be causing problems.

    ginger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Return All Variables To Form Page On Error
    By cornernote in forum FormMail Subscription Support
    Replies: 12
    Last Post: 31-Oct-2004, 10:20 PM
  2. Removing empty variables from eMail reply
    By Prospero in forum FormMail Subscription Support
    Replies: 4
    Last Post: 25-Jul-2004, 08:22 AM
  3. Environment Variables
    By Goji in forum FormMail Subscription Support
    Replies: 1
    Last Post: 22-Jul-2004, 03:39 AM
  4. Return All Variables To Bad_Form Page On Error
    By vladimir in forum FormMail Subscription Support
    Replies: 2
    Last Post: 07-Jun-2004, 06:13 PM
  5. Adding Attachment Variables
    By Bella in forum FormMail Subscription Support
    Replies: 1
    Last Post: 12-Apr-2004, 10:43 AM

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