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] non-valid entries return empty form
#4
Followed the instrucions here http://forums.formtools.org/showthread.php?tid=215
no success.

New code stilll submits if everything is fine, but returns an empty form from invalid submissions. Form is filled in ONLY when page is left and re-browsed.

PHP Code:
<?php
require_once("LeadsManager/global/api/api.php");
$fields ft_api_init_form_page(9);

$errors = array();
if (isset(
$_POST['contact_submit'])) {
  
$rules = array();
  
$rules[] = "required,name,Please enter your name.";
  
$rules[] = "required,email,Please enter your email address.";
  
$rules[] = "valid_email,email,Please enter a valid email address.";
  
$errors validate_fields($_POST$rules);

if (empty(
$errors)) {

    
$params = array(
      
"submit_button" => "contact_submit",
      
"next_page" => "thankyou.php",
      
"form_data" => $_POST,
      
"finalize" => true
    
);
    
    
ft_api_process_form($params);
    }

Reply


Messages In This Thread
[STILL NOT WORKING] - by sergiozambrano - Aug 14th, 2009, 6:03 AM
RE: non-valid entries return empty form - by Ben - Aug 16th, 2009, 10:41 AM
[SOLVED] - by sergiozambrano - Aug 18th, 2009, 6:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)