Title: empty fields after signup error
Last modified: August 30, 2016

---

# empty fields after signup error

 *  Resolved [Ghostflasher](https://wordpress.org/support/users/ghostflasher/)
 * (@ghostflasher)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/)
 * Hi,
 * I made a custom signup form. Everything works so, I have just one little issue.
   When somebody tries to sign up and misses a required field, the sign up process
   returns to the form with an error message. So far so good.
    The problem is, that
   all the information entered before is then lost and the user has to enter everything
   again.
 * Any hint how to fix this?
    Cheers Dan
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789170)
 * Are you using a custom template? Are you using CloudFlare or other third-party
   website acceleration service?
 *  Thread Starter [Ghostflasher](https://wordpress.org/support/users/ghostflasher/)
 * (@ghostflasher)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789173)
 * Hey xnau,
 * like i wrote: I use a custom signup form. No acceleration service.
 * Cheers
    Dan
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789178)
 * sorry, I skimmed over that… So, when someone submits a form, the data they submitted
   is in the $_POST array. If another plugin changes that array, the user’s input
   could be lost. I’d suggest looking at the $_POST array at the top of your form
   to see if those values are still available when the form is being shown…you can
   dump it into the error log or show it on the screen if the page is not public:
 * `<pre><?php echo print_r($_POST,1) ?></pre>`
 * If the user’s values are not in the $_POST array, then a little detective work
   may be needed to find out what is happening. Take a look at the network panel
   of your browser when you submit the form, make sure there are no extra page loads
   happening (such as the POST followed by a GET) there should only be the POST 
   request back to the same page. Also check your other plugins for anything that
   might also be doing things with the POST array.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789180)
 * One more thing: first make sure your template is using the correct functions 
   to show the form fields. If you’re writing your own functions, make sure they
   include the user’s values from the POST array.
 *  Thread Starter [Ghostflasher](https://wordpress.org/support/users/ghostflasher/)
 * (@ghostflasher)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789437)
 * hey xnau,
 * sorry I didn’t reply that long. Had a lot of other stuff going on. The data is
   in the $_Post.
    I can retriev it e.g. by using:
 * `echo $_POST[first_name];`
 * My custom from uses the plugins functions to draw the form:
 *     ```
       <label class="control-label" for="pdb-first_name" >Vorname<span class="reqd">*</span></label>
                   <div class="controls"><?php $this_form->print_form_element('first_name'); ?> </div>
       ```
   
 * Just the value are not displayed in the fields after an error (e.g. not all required
   field are completed)
    Now…. how can I “inject” the $_POST data into your form
   element function?
 * thx
    dan
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789438)
 * Did you try
 * `$this_form->value = $_POST['first_name'];`
 * before it is displayed?
 * anyway if that works, that’s not the right way to do it, it’s just a test.
 * the right way to do it would be something like this:
 *     ```
       $new_value = filter_input( INPUT_POST, 'first_name', FILTER_SANITIZE_STRING);
       if ($new_value) {
          $this_form->value = $new_value;
       }
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘empty fields after signup error’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/empty-fields-after-signup-error/#post-6789438)
 * Status: resolved