Are you using a custom template? Are you using CloudFlare or other third-party website acceleration service?
Hey xnau,
like i wrote: I use a custom signup form. No acceleration service.
Cheers
Dan
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.
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.
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
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;
}