FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fixed]Empty form after error but filled back out when reloaded?
#1
Bug 
http://advancemarketinfo.com/freeinfo.php
is a 2 forms set, which is finalized in first form since the second one is optional.

It works fine as long as it passes the validation. If it doesn't, the form reloads empty, never getting to the second form. If you reload the page, first form DOES get the info back, but throws error 302 if submitted.

So there's no way to get the second form if it's not filled out at the first attempt.

In other words: Info is lost when it should kept, and kept when should be dropped for a new submission.

The form is a copy of a previous one, with recaptcha, which had the same issue (was a single form) but it was fixed successfully.

Ideas?
Reply
#2
This was actually more than one issue.

The empty fields after validation failure was fixed actually using the solution Ben gave me some time ago, but for some reason I lost the more recent copy and based these forms in that outdated one.

The fix was to replace this
PHP Code:
ft_api_process_form($params);
    } 
  }


with this

PHP Code:
ft_api_process_form($params);
        
$fields array_merge($fields$_SESSION["form_tools_form"]);
    } else {
      
$fields array_merge($fields$_POST);
  }


Here is the thread about that with other solutions to similar/derivated issues

The second problem is the may_update_finalized_submissions PANIC which describes the trials and errors that made impossible (for me) to create a 2 pages form that gathers all the info under the same form ID. (finalizing the first one to get an email confirmation, since 2nd form is OPTIONAL)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)