ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

HTTPS form data doesn't persist

July 19, 2012 5:33pm

Subscribe [2]
  • #1 / Jul 19, 2012 5:33pm

    Maheradmin

    22 posts

    Hello, I’ve come across an issue when submitting forms over https.

    Basically when a user submits a form, the validation errors on the next page send the user back to the form to correct the invalid data. This works fine over http, but when submitting over https, the form data is cleared out.

  • #2 / Jul 20, 2012 9:33am

    Kevin Smith

    4784 posts

    Hi Maheradmin,

    When using https, are all pages involved using secure connections (https) or are you switching back and forth between secure and insecure connections? My guess is that a return to an insecure page after submitting through a secure connection will clear the page.

    Do you have an example of this that you can provide?

  • #3 / Jul 20, 2012 9:40am

    Maheradmin

    22 posts

    Yes, register page and resulting pages all run via https. Here’s a sample form I’m using to test this.

    <!DOCTYPE HTML>
    <html lang="en-US">
     <head>
      <title>Test</title>
      <meta charset="utf-8" />
      <style>
       label {
        display: block;
        width: 150px;
        margin-right: 10px;
        float: left;
       }
       input {
        float: left;
        display: block;
        width: 300px;
       }
       
       .row {
        clear: left;
        display: block;
        width: 650px;
        padding: 10px 0;
       }
      </style>
      <link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen">
     </head>
     <body>
      <h1>Test Form</h1>
      
      {exp:safecracker channel="test" safecracker_head="no" include_jquery="no" secure_action="yes" secure_return="yes"}
      
       <div class="row">
        <label for="title">Title</label>
          <input name="title" type="text">
       </div>
       <div class="row">
        <label for="test_1">Test Data 1</label>
              <input type="text" id="test_1" name="test_1" maxlength="128" size="50">
             </div>
             <div class="row">
        <label for="test_2">Test Data 2</label>
        <input type="text" id="test_2" name="test_2"  maxlength="128" size="50">
             </div>
             <div class="row">
       {if captcha}
              <label for="captcha">Please enter the word you see in the image:</label>
              {captcha}
              <input type="text" name="captcha" value="{captcha_word}" maxlength="20">
       {/if}
       </div>
       <div class="row">
        <input type="submit" value="Submit">
       </div>
      {/exp:safecracker}
    
     </body>
    </html>
  • #4 / Jul 20, 2012 4:55pm

    Kevin Smith

    4784 posts

    Could I get a look at this one first hand, Maheradmin? Be on the lookout for an email from me.

  • #5 / Jul 20, 2012 4:56pm

    Maheradmin

    22 posts

    Sure thing…

  • #6 / Jul 20, 2012 5:03pm

    Maheradmin

    22 posts

    Ok sent over the info. Try the SAEF form with both HTTP and HTTPS… you’ll notice the issue is only evident in the HTTPS form.

  • #7 / Jul 20, 2012 5:39pm

    Shane Eckert

    7174 posts

    Hey Maheradmin,

    Thanks!

  • #8 / Jul 20, 2012 5:43pm

    Maheradmin

    22 posts

    Also sent FTP info… forgot about that 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases