Skip to main content
Inspiring
February 19, 2019
Answered

Fillable Form: How to Automatically Fill in Email Address Field on 2nd Form

  • February 19, 2019
  • 2 replies
  • 2362 views

My clients must fill out their email address field in order for a fillable form to be sent to me. After they press Submit they are taken to another fillable form. Can their email address automatically appear in this form?

Here is an example page:

1959 Corvette Options

    This topic has been closed for replies.
    Correct answer BenPleysier

    In the documment where the action for the first form takes place, contact.php, add the following code

    <?php

      session_start();

      $_SESSION["email"] = $_POST["email"];

    ?>

    then in the document where the action for the second form takes place, (not known), insert the following code

    <?php

      session_start();

      $_POST["email"] = $_SESSION["email"];

    ?>

    There is no need to have a form input field for email because it will be automatically added.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    February 19, 2019

    Why must your customers complete 2 forms?

    And why are you collecting user data from a non HTTPS  site? 

    Screenshot from Chrome:

     

    Nancy O'Shea— Product User & Community Expert
    Inspiring
    February 20, 2019

    No sensitive info is required, but how do I secure the site? I built it in Dreamweaver?

    BenPleysier
    Community Expert
    Community Expert
    February 19, 2019

    Yes, there are a number of ways to do this, namely

    • using a URL parameter
    • using a cookie
    • using a session variable

    Personally I would go for the last option. For more see PHP 5 Sessions or Google the subject.

    Also have a look at https://www.webascender.com/blog/do-i-need-an-ssl-certificate-for-my-website/

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Inspiring
    February 20, 2019

    I checked the link but it offers general info on php pages. I really need a more specific answer to my question.

    BenPleysier
    Community Expert
    BenPleysierCommunity ExpertCorrect answer
    Community Expert
    February 20, 2019

    In the documment where the action for the first form takes place, contact.php, add the following code

    <?php

      session_start();

      $_SESSION["email"] = $_POST["email"];

    ?>

    then in the document where the action for the second form takes place, (not known), insert the following code

    <?php

      session_start();

      $_POST["email"] = $_SESSION["email"];

    ?>

    There is no need to have a form input field for email because it will be automatically added.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!