Form CSV files

Issues related to forms.
davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Form CSV files

Post by davidflash » Sun Jan 21, 2018 3:00 am

Is there any setting to allow the csv files to include column headers ?? I created a test form and I do get the csv files but not column headers !
I check the WB 12 user guide with no luck.

Also I noticed that the layout of the form's field as set by the tab order is not consistent with the csv file. Is it possible to get the csv file to be populated with the tab order of the form ?
I check the WB 12 userguide with no luck.

Any assistance will be appreciated,

Thanks.

User avatar
BaconFries
 
 
Posts: 4633
Joined: Thu Aug 16, 2007 7:32 pm

Re: Form CSV files

Post by BaconFries » Sun Jan 21, 2018 3:44 am

Is there any setting to allow the csv files to include column headers ??
Not sure if it can be done with any of the forms properties but it can be achieved with the
DBTS Form Processor by Navaldesign.
8. You can store the uploaded data in a CSV file (two types of CSV, plain CSV, MS Excel CSV). The script will also automatically add columns in the CSV file
DBTS Form Processor
Also I noticed that the layout of the form's field as set by the tab order is not consistent with the csv file.
The order of form field can be changed with 'Arranges Objects' in the context menu of the form.

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Sun Jan 21, 2018 6:26 am

I just downloaded dbts_form_processor for evaluating and immediately having issues. I was told that dbts_form_processor , the lastest version from WWB extension manager has the ability to save csv files WITH header columns Not seeing that.
Additonally, I am getting the administrator's email with only the date, ip address, and timestamp. NO Field data from the form.

I search read for hours, with no luck.
I review the user guide, with no luck.

Where do you define, select the form data to populate the Administrator's email with form fields to be included.

My csv files just have the date, ip address and timestamp as well.

HELP !!!

and... thanks.

David.

User avatar
Pablo
 
Posts: 17606
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Form CSV files

Post by Pablo » Sun Jan 21, 2018 8:23 am

I'm sorry the built-in form script does not support CSV headers. However you can add them yourself before you upload the CVS file to the server.

The form data will be send in the order the elements appear on the page (the z-order), this is unrelated to the tab-order. The tab-order does not affect the order of the objects.
To change the order of the objects you can use 'Re-arrange objects' tool.

User avatar
Navaldesign
 
 
Posts: 1008
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Form CSV files

Post by Navaldesign » Sun Jan 21, 2018 10:24 am

The DBTS_Form Processor DOES create headers in the CSV file. The headers are automatically set to be the form field names.
Also, all fields are saved in the CSV including datestamp and ip address
www.dbtechnosystems.com

User avatar
BaconFries
 
 
Posts: 4633
Joined: Thu Aug 16, 2007 7:32 pm

Re: Form CSV files

Post by BaconFries » Sun Jan 21, 2018 10:47 am

I was told that dbts_form_processor , the lastest version from WWB extension manager has the ability to save csv files WITH header columns Not seeing that.
@davidflash This is from the developer himself....I wouldn't have suggested it to you otherwise.😒
The DBTS_Form Processor DOES create headers in the CSV file. The headers are automatically set to be the form field names.

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Sun Jan 21, 2018 4:09 pm

First, I would like to say thanks for those immediate replies... On some forum, members can expect to wait days for any replies, you guys are great.
Thank you Pablo, Baconfries, and Navaldesign

Okay, Pablo, was right, the built-in form processor DOES NOT create CSV file headers using the form field names.

But the DBTS_Form_Processor does as per statement by Naveldesign and Baconfries. However, when I added the required info into the DBTS_Form_Processor Object on my page, Under the B Section Actions, I just see "Store Date in CSV file. I selected "Yes".

So I am apologizing for not seeing the column headers (Time of Submission,Timestamp,IP Address)

But When I look at the CSV file created I only see:
Time of Submission,Timestamp,IP Address
" Saturday 20th January 2018, 10:38 PM "," 1516509534 "," 72.211.90.80 "
" Saturday 20th January 2018, 10:44 PM "," 1516509849 "," 72.211.90.80 "
" Saturday 20th January 2018, 10:51 PM "," 1516510271 "," 72.211.90.80 "
" Saturday 20th January 2018, 10:52 PM "," 1516510326 "," 72.211.90.80 "
" Saturday 20th January 2018, 11:08 PM "," 1516511295 "," 72.211.90.80 "
" Saturday 20th January 2018, 11:15 PM "," 1516511742 "," 72.211.90.80 "
" Saturday 20th January 2018, 11:29 PM "," 1516512594 "," 72.211.90.80 "
" Saturday 20th January 2018, 11:54 PM "," 1516514084 "," 72.211.90.80 "
" Saturday 20th January 2018, 11:55 PM "," 1516514115 "," 72.211.90.80 "
" Sunday 21st January 2018, 12:03 AM "," 1516514585 "," 72.211.90.80 "

But the reason why this glaring visual omission of not seeing the headers took place because I was so focus and surprised on "NOT Seeing" my form data in the CSV file.
So, did I missed something in the DBTS_Form_Processor manual that instructed me to set some other setting to allow the CSV data to capture the input fields from my form???

Also, my Administrator's email message also , I only get

"There has been a new submission from our Website form. Here is the info submitted:
Please review and act accordingly.

Time of Submission Sunday 21st January 2018, 10:00 AM
Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
IP Address 72.211.90.80"

No form data .

And no AutoReply message to the sender.... In this case, for testing I used my own email address as the form submitter client. This works out well when I used the built-in WWB form processor.

So again, I appreciate any feedback on those issues.
Thanks.

User avatar
Navaldesign
 
 
Posts: 1008
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Form CSV files

Post by Navaldesign » Sun Jan 21, 2018 4:40 pm

Please publish the form page URL.

Most probably the data is not sent because you have not set, in the form properties, the Encoding Type to be "Multipart / form data".
For the same reason no autoresponder message is sent.
Please provide the form URL so I can have a look.
www.dbtechnosystems.com

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Sun Jan 21, 2018 5:43 pm

Ok, I am now getting the Adminstrator's email with populated form field input. The "multipart" setting in the form did it. Unfortunately I did not see that requirement anywhere in the userguide. Additionally, when using WWB built-in form processor I was getting everything (admin email, autoreply email, and csv file) with the form setting as "Plain". This let to my confusion. I thought you just drop the DBTS_Form_Processor object on your existing form and unchecked the "Use built-in Form Processor".

Additionally, my csv file now has the columns, but the data are all blank. See below.

," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "
" "," "," "," "," "," "," "," "," "," "," "," "," "

Also, I am getting this error message when I submit the form:
The following From address failed: salvantfamily Error: EMAIL FAILED Mailer Error: The following From address failed: salvantfamily

I am assuming this to be my autoreply email because I am getting the Administrator's email successfully. Can't figure out where or what causing this error.

See the attached HTML page info if this can give you a clue as to what I am doing wrong.

<?php
// This script was created by DBTECHNOSYSTEMS.com ----
// © DBTechnosystems.com http://www.dbtechnosystems.com
// You may use this script but please leave author details here
// DBTS Form Processor Extension version 2.7.5.6

ini_set('display_errors', 1);
$version = "2.7.5.6";
error_reporting(0);
if(session_id() == ""){
session_start();
}
if("Working Mode" == "Debug Mode"){
error_reporting(E_ALL);
}

$SESSION = $_SESSION['POST'];
if(is_array($SESSION)){
while (list ($key, $val) = each($SESSION)) {
// Stripslashes only if it is not an array, or it empties the array
if (!is_array($val)) {
$SESSION[$key] = stripslashes($val);
}
}
extract ($SESSION, EXTR_OVERWRITE);
}

if($_SERVER['REQUEST_METHOD'] == 'POST')
{

$error="";

require_once 'dbts_includes/dbts_functions.php';

// -------- RECEIVIMG CONFIG FILE VARIABLES-----------
$form_id = "";
$from_email = "david@removed.com";
$nameto = "Webmaster";
$mailto = "dmroth@removed.com";
$cc_email = "";
$bcc_email = "";
$email_field = "email";
$charset = "UTF8";
$success_url = "";
$error_url = "";
$timezone = "America/Chicago";
if(trim($timezone) != ""){
if (function_exists(date_default_timezone_set)) {
date_default_timezone_set($timezone);
}
else{
putenv ($timezone);
mktime(0,0,0,1,1,1970);
}
}
$time_format = "";
$date = date("l jS F Y, g:i A");
if(trim($time_format) != ""){
$date = date("");
}
$admin_mail = "Yes";
$autoresponder = "Yes";
$csvStore = "Yes";
$dbStore = "No";

$post_further = "No";
$post_further_to = "";

$copy_in_session = "No";
$copy_from_session = "No";
$clear_session = "Yes";
$afterprocessing = "Redirect";
$end_include = "";
$include_null_fields = "No";
$null_field_text = "No user input";
$excluded_fields = "";
$allow_urls = "Yes";

$captcha_rewrite = "Yes";
$captcha_error = "The entered code is wrong!";

$force_recaptcha = "No";
$privatekey = "";
$recaptcha_error_array['invalid-site-private-key'] = "We weren't able to verify the private key.";
$recaptcha_error_array['invalid-request-cookie'] = "The challenge parameter of the verify script was incorrect.";
$recaptcha_error_array['incorrect-captcha-sol'] = "The code you have entered in the captcha is wrong";
$recaptcha_error_array['recaptcha-not-reachable'] = "The captcha verification server is not accessible at the moment, so we can't verify your input. Please try again later.";
$recaptcha_failure_behavior = "Allow submission";

$use_reverse_captcha = "No";
$non_empty_field_name = "";
$non_empty_field_value = "";
$empty_field_name = "";
$reverse_captcha_error = "";
$reverse_captcha_behavior = "Display Success Page";

$enable_departments = "No";
$department_field = "department";

$departments = array();
$department_emails = array();


$banned_behavior = "Display Success Page";
$banned_error = "";

$banned_ipname = array();
$banned_ipaddress = array();


$bannedemail_names = array();
$bannedemail_emails = array();


$logo_image_url = "";
$logo_alt = "Visit our site!";
$logo_link = "http://www.yourdomain.com";
$logo_bgrd_clr = "#FFFFFF";
$logo_align = "center";

$table_width = "600";
$labelscolumn_width = "";
$cellspacing = "0";
$cellpadding = "1";
$border_width = "0";
$border_clr = "#F8F8F8";
$border_type = strtolower("Default");
$bgrd_clr = "#FFFFFF";
$table_bgrd_clr = "#FFFFFF";
$header_bgrd_clr = "#D3D7FE";
$footer_bgrd_clr = "#D3D7FE";
$labels_text_clr = "#000000";
$labels_bkgd_clr = "#FFFFFF";
$values_text_clr = "#000000";
$values_bkgd_clr = "#FFFFFF";

$time_of_submission_label = "Time of Submission";
$ip_address_label = "IP Address";
$browser_label = "Browser";

$admin_mode = "HTML";
$subject = "New Submission from our Website Form";
$namefrom = "Website Form Manager";
$form_namefrom = "";
$htmlbodystart = '<font style="color:#000000;font-family:Arial;font-size:16px">There has been a new submission from our Website form. Here is the info submitted:</font>';
$bodystart = "There has been a new submission from our Website form. Here is the info submitted:";
$htmlbodyend = 'Please review and act accordingly.';
$bodyend = "Please review and act accordingly.";
$custom_admin_mail_template = "";
$include_ip ="Yes";
$include_browser = "Yes";
$include_datetime = "Yes";

$auto_mode = "HTML";
$autorespondersubject = "Contact Confirmation";
$autoresponderfrom = "dmroth@removed.com";
$include_info = "Yes";
$autorespondernamefrom = "Salvant 2019 Reunion";
$auto_form_nameto = "LastName";
$htmlautoresponderstart= 'Hello, this email is to confirm that your info has been received.';
$autoresponderstart = "Hello, this email is to confirm that your info has been received.";
$htmlautoresponderend = 'Thank you for contacting us!';
$autoresponderend = "Thank you for contacting us!";
$custom_auto_mail_template = "";
$auto_include_datetime = "Yes";
$auto_attach = "";

$file_ext = strtolower("jpg, gif, png, bmp, mp3, pdf, html, htm");
$filesize = "1024";
$store_uploaded = "Yes";
$uploadfolder = "uploads";
$add_prefix = "Yes";
$attach_files = "No";
$max_attach_size = "10";

$double_quote_fields = "Yes";
$csvSeparator = "comma ,";
$csvFile = "fomdata.csv";

$db_host = "localhost";
$db_name = "database_name";
$db_user = "username";
$db_password = "password";
$db_table = "table_name";
$create_table = "Yes";
$add_columns = "Yes";

$mail_engine = "SMTP";
$SMTPSecure = "No";
$SMTPHost = "Removed";
$SMTPPort = "25";
$SMTPAuth = "true";
$SMTPUser = "Removed";
$SMTPPass = "Removed";

$start_of_script_include = '';
$before_formdata_include = '';
$after_formdata_include = '';
$after_filedata_include = '';
$before_error_include = '';
$before_admin_mail_include = '';
$before_auto_mail_include = '';
$end_of_script_include = '';
$end_include = '';

// End of settings section
// Process form
include 'dbts_includes/dbts_formprocessor.php';
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>2019 Salvant Family Reunion Reqistration Fomr</title>
<meta name="generator" content="WYSIWYG Web Builder 12 - http://www.wysiwygwebbuilder.com">
<link href="wb.validation.css" rel="stylesheet">
<link href="Salvant.css" rel="stylesheet">
<link href="RegistrationForm2.css" rel="stylesheet">
<script src="jquery-1.12.4.min.js"></script>
<script src="wb.validation.min.js"></script>
<script>
function ValidateRegistrationForm(theForm)
{
var regexp;
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.Email.value.length != 0 && !regexp.test(theForm.Email.value))
{
alert("Please enter a valid email address.");
theForm.Email.focus();
return false;
}
return true;
}
</script>
<meta name="form_processor" content="DBTS WWB Form Processor v. 2.7.5.7">
<script>
$(document).ready(function()
{
$("#Form1").submit(function(event)
{
var isValid = $.validate.form(this);
return isValid;
});
$("#Last").validate(
{
required: true,
type: 'custom',
param: /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/,
length_min: '1',
length_max: '30',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: true,
font_family: 'Arial',
font_size: '13px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must have a Last name'
});
$("#First").validate(
{
required: true,
type: 'custom',
param: /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/,
length_min: '1',
length_max: '30',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: false,
font_family: 'Arial',
font_size: '16px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must have a First Name'
});
$("#Guest1, #Guest2").change(function()
{
$('#Total').val(Number($('#Guest1').val()) + Number($('#Guest2').val()))
});
$("#Guest1").trigger('change');
$("#Editbox4").validate(
{
required: true,
type: 'text',
length_min: '10',
length_max: '14',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: false,
font_family: 'Arial',
font_size: '13px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must enter valid Phone Number'
});
});
</script>
</head>
<body>
<div id="wb_Form1" style="position:absolute;left:57px;top:35px;width:900px;height:751px;z-index:20;">
<form name="RegistrationForm" method="post" action="" enctype="multipart/form-data" target="_self" id="Form1" onsubmit="return ValidateRegistrationForm(this)">
<select name="prefix" size="1" id="Combobox1" style="position:absolute;left:93px;top:43px;width:80px;height:30px;z-index:0;">
<option selected value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Miss">Miss</option>
<option value="Ms.">Ms.</option>
<option value="Dr.">Dr.</option>
</select>
<label for="Last" id="Label2" style="position:absolute;left:475px;top:14px;width:182px;height:18px;line-height:18px;z-index:1;">First Name:</label>
<label for="Email" id="Label4" style="position:absolute;left:511px;top:97px;width:56px;height:18px;line-height:18px;z-index:2;">Email:</label>
<label for="First" id="Label5" style="position:absolute;left:122px;top:163px;width:48px;height:18px;line-height:18px;z-index:3;">Guest1</label>
<label for="First" id="Label7" style="position:absolute;left:122px;top:199px;width:43px;height:18px;line-height:18px;z-index:4;">Guest2</label>
<input type="number" id="Guest2" style="position:absolute;left:32px;top:235px;width:190px;height:18px;line-height:18px;z-index:5;" name="Guest2" value="" tabindex="6" spellcheck="false" accesskey="6">
<input type="number" id="Total" style="position:absolute;left:595px;top:305px;width:60px;height:18px;line-height:18px;z-index:6;" name="Total" value="0" spellcheck="false">
<label for="First" id="Label3" style="position:absolute;left:183px;top:15px;width:182px;height:18px;line-height:18px;z-index:7;">Last Name:</label>
<label for="" id="Label8" style="position:absolute;left:56px;top:97px;width:109px;height:19px;line-height:19px;z-index:8;">Phone Number</label>
<label for="Combobox1" id="Label1" style="position:absolute;left:38px;top:45px;width:47px;height:18px;line-height:18px;z-index:9;">Prefix:</label>
<label for="" id="Label9" style="position:absolute;left:28px;top:276px;width:656px;height:21px;line-height:21px;z-index:10;">Additional Atttenees can be placed here.</label>
<input type="submit" id="Button1" name="" value="Send" style="position:absolute;left:775px;top:164px;width:96px;height:25px;z-index:11;">
<div id="wb_RadioButton2" style="position:absolute;left:351px;top:400px;width:20px;height:20px;z-index:12;">
<input type="radio" id="RadioButton2" name="Age" value="on" style="position:absolute;left:0;top:0;"><label for="RadioButton2"></label></div>
<div id="wb_RadioButton3" style="position:absolute;left:346px;top:441px;width:20px;height:20px;z-index:13;">
<input type="radio" id="RadioButton3" name="Age" value="" checked style="position:absolute;left:0;top:0;"><label for="RadioButton3"></label></div>
<input type="text" id="First" style="position:absolute;left:595px;top:17px;width:190px;height:18px;line-height:18px;z-index:14;" name="FirstName" value="" tabindex="2" spellcheck="false" accesskey="2" title="First Name" placeholder="First name">
<input type="text" id="Email" style="position:absolute;left:618px;top:78px;width:190px;height:18px;line-height:18px;z-index:15;" name="email" value="" tabindex="4" spellcheck="false" accesskey="4" placeholder="Email Address">
<input type="text" id="Editbox4" onchange="formatPhone(this.id, this.value);return false;" style="position:absolute;left:186px;top:97px;width:227px;height:25px;line-height:25px;z-index:16;" name="Phone" value="" maxlength="17" tabindex="3" spellcheck="false" title="Phone Number" placeholder="area code and phone number">
<input type="text" id="Last" style="position:absolute;left:183px;top:44px;width:190px;height:18px;line-height:18px;z-index:17;" name="LastName" value="" tabindex="1" spellcheck="false" accesskey="1" title="Last Name" placeholder="Last Name">
<input type="number" id="Guest1" style="position:absolute;left:204px;top:198px;width:190px;height:18px;line-height:18px;z-index:18;" name="Guest1" value="" tabindex="5" spellcheck="false" accesskey="5">
<label for="Total" id="Label6" style="position:absolute;left:284px;top:250px;width:79px;height:18px;line-height:18px;z-index:19;">Total Guests</label>
</form>
</div>
<div id="wb_Extension1" style="position:absolute;left:1202px;top:12px;width:120px;height:102px;z-index:21;">
</div>
</body>
</html><script>
function formatPhone(mID, gal) {
var t = gal;
var ID = mID;

var n = gal.length;
// alert(n);
var patForReqdFld = /^(\-)?([\d]+(?:\.\d{1,2})?)$/;
var patForOptFld = /^(\-)?([\d]*(?:\.\d{1,2})?)$/;

if (n <10){
// alert("yes less than");
var a = document.getElementById(ID);
a.value ="";
return;
}
// alert(n);

if(patForReqdFld.test(t)){
// alert("Yes");
t = "(" + gal.substr(0,3) +") " + gal.substr(3,3)+ "-"+ gal.substr(6,4);
var a = document.getElementById(ID);
a.value =t;
}
else
{
var a = document.getElementById(ID);
a.value ="";
}

}

</script>

User avatar
Navaldesign
 
 
Posts: 1008
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Form CSV files

Post by Navaldesign » Sun Jan 21, 2018 5:52 pm

davidflash wrote:
Sun Jan 21, 2018 5:43 pm
Ok, I am now getting the Adminstrator's email with populated form field input. The "multipart" setting in the form did it. Unfortunately I did not see that requirement anywhere in the userguide. Additionally, when using WWB built-in form processor I was getting everything (admin email, autoreply email, and csv file) with the form setting as "Plain".
Impossible, because the built in form processor automatically sets the encoding type to "multipart / form data".

Also, from the DBTS Form Processor instructions manual:

The Form and its settings:
DBTS Form Processor does NOT create the form for you!
You need to create a form in your page using the WB Form Wizard or the WB form
tools. Once you have created the form, make sure to respect the following
settings:
The form page MUST be published as PHP.
The form action MUST be set to be “<?php echo basename(__FILE__);?>
The form encoding type MUST be “multipart/form-data”
The submit button MUST be named “submit” though its value can be anything
(like “Send”, “Send Info Now” or anything else).

Did you set the "action" also ?

And, I see no "success" and "error" page settings.
www.dbtechnosystems.com

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Sun Jan 21, 2018 6:37 pm

Ok, going further, I will not make any assumption, When I checked my orginal form, the one with WWB processor, it was grayed out but the type was set as "Multi".. I apologized for making the dump assumption without checking... Never again. At this point, i did not care to set a success or error email message until I get the form working properly.

But what about no values in the CSV, before I set the form to "Multi", I was getting the csv file populated with just the Date, IP, and Timestamp., now I get just header with no data.

," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "
" "," "," "," "," "," "," "," "," "," "," "," "," "

Under b. Actions, everything is set to yes, except "Store data in database".

User avatar
Navaldesign
 
 
Posts: 1008
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Form CSV files

Post by Navaldesign » Sun Jan 21, 2018 6:53 pm

Please set the form action (in the form properties) as per my above post.
In the page HTML you posted above, the action is blank (no action)
www.dbtechnosystems.com

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Sun Jan 21, 2018 7:21 pm

Ok, I set it as request... Still my csv is totally blank, just header columns.

," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "," Time of Submission "," Timestamp "," IP Address "," Time of Submission "," Timestamp "," IP Address "," Prefix "," Guest2 "," Total "," Age "," Firstname "," Email "," Phone "," Lastname "," Guest1 "
" "," "," "," "," "," "," "," "," "," "," "," "," "
" "," "," "," "," "," "," "," "," "," "," "," "," "
" "," "," "," "," "," "," "," "," "," "," "," "," "
" "," "," "," "," "," "," "," "," "," "," "," "," "
" "," "," "," "," "," "," "," "," "," "," "," "," "

Here is the page html
<?php
// This script was created by DBTECHNOSYSTEMS.com ----
// © DBTechnosystems.com http://www.dbtechnosystems.com
// You may use this script but please leave author details here
// DBTS Form Processor Extension version 2.7.5.6

ini_set('display_errors', 1);
$version = "2.7.5.6";
error_reporting(0);
if(session_id() == ""){
session_start();
}
if("Working Mode" == "Debug Mode"){
error_reporting(E_ALL);
}

$SESSION = $_SESSION['POST'];
if(is_array($SESSION)){
while (list ($key, $val) = each($SESSION)) {
// Stripslashes only if it is not an array, or it empties the array
if (!is_array($val)) {
$SESSION[$key] = stripslashes($val);
}
}
extract ($SESSION, EXTR_OVERWRITE);
}

if($_SERVER['REQUEST_METHOD'] == 'POST')
{

$error="";

require_once 'dbts_includes/dbts_functions.php';

// -------- RECEIVIMG CONFIG FILE VARIABLES-----------
$form_id = "";
$from_email = "david@removed.com";
$nameto = "Webmaster";
$mailto = "dmroth@removed.com";
$cc_email = "";
$bcc_email = "";
$email_field = "email";
$charset = "UTF8";
$success_url = "";
$error_url = "";
$timezone = "America/Chicago";
if(trim($timezone) != ""){
if (function_exists(date_default_timezone_set)) {
date_default_timezone_set($timezone);
}
else{
putenv ($timezone);
mktime(0,0,0,1,1,1970);
}
}
$time_format = "";
$date = date("l jS F Y, g:i A");
if(trim($time_format) != ""){
$date = date("");
}
$admin_mail = "Yes";
$autoresponder = "Yes";
$csvStore = "Yes";
$dbStore = "No";

$post_further = "No";
$post_further_to = "";

$copy_in_session = "No";
$copy_from_session = "No";
$clear_session = "Yes";
$afterprocessing = "Redirect";
$end_include = "";
$include_null_fields = "No";
$null_field_text = "No user input";
$excluded_fields = "";
$allow_urls = "Yes";

$captcha_rewrite = "Yes";
$captcha_error = "The entered code is wrong!";

$force_recaptcha = "No";
$privatekey = "";
$recaptcha_error_array['invalid-site-private-key'] = "We weren't able to verify the private key.";
$recaptcha_error_array['invalid-request-cookie'] = "The challenge parameter of the verify script was incorrect.";
$recaptcha_error_array['incorrect-captcha-sol'] = "The code you have entered in the captcha is wrong";
$recaptcha_error_array['recaptcha-not-reachable'] = "The captcha verification server is not accessible at the moment, so we can't verify your input. Please try again later.";
$recaptcha_failure_behavior = "Allow submission";

$use_reverse_captcha = "No";
$non_empty_field_name = "";
$non_empty_field_value = "";
$empty_field_name = "";
$reverse_captcha_error = "";
$reverse_captcha_behavior = "Display Success Page";

$enable_departments = "No";
$department_field = "department";

$departments = array();
$department_emails = array();


$banned_behavior = "Display Success Page";
$banned_error = "";

$banned_ipname = array();
$banned_ipaddress = array();


$bannedemail_names = array();
$bannedemail_emails = array();


$logo_image_url = "";
$logo_alt = "Visit our site!";
$logo_link = "http://www.yourdomain.com";
$logo_bgrd_clr = "#FFFFFF";
$logo_align = "center";

$table_width = "600";
$labelscolumn_width = "";
$cellspacing = "0";
$cellpadding = "1";
$border_width = "0";
$border_clr = "#F8F8F8";
$border_type = strtolower("Default");
$bgrd_clr = "#FFFFFF";
$table_bgrd_clr = "#FFFFFF";
$header_bgrd_clr = "#D3D7FE";
$footer_bgrd_clr = "#D3D7FE";
$labels_text_clr = "#000000";
$labels_bkgd_clr = "#FFFFFF";
$values_text_clr = "#000000";
$values_bkgd_clr = "#FFFFFF";

$time_of_submission_label = "Time of Submission";
$ip_address_label = "IP Address";
$browser_label = "Browser";

$admin_mode = "HTML";
$subject = "New Submission from our Website Form";
$namefrom = "Website Form Manager";
$form_namefrom = "";
$htmlbodystart = '<font style="color:#000000;font-family:Arial;font-size:16px">There has been a new submission from our Website form. Here is the info submitted:</font>';
$bodystart = "There has been a new submission from our Website form. Here is the info submitted:";
$htmlbodyend = 'Please review and act accordingly.';
$bodyend = "Please review and act accordingly.";
$custom_admin_mail_template = "";
$include_ip ="Yes";
$include_browser = "Yes";
$include_datetime = "Yes";

$auto_mode = "HTML";
$autorespondersubject = "Contact Confirmation";
$autoresponderfrom = "dmroth@removed.com";
$include_info = "Yes";
$autorespondernamefrom = "Salvant 2019 Reunion";
$auto_form_nameto = "LastName";
$htmlautoresponderstart= 'Hello, this email is to confirm that your info has been received.';
$autoresponderstart = "Hello, this email is to confirm that your info has been received.";
$htmlautoresponderend = 'Thank you for contacting us!';
$autoresponderend = "Thank you for contacting us!";
$custom_auto_mail_template = "";
$auto_include_datetime = "Yes";
$auto_attach = "";

$file_ext = strtolower("jpg, gif, png, bmp, mp3, pdf, html, htm");
$filesize = "1024";
$store_uploaded = "Yes";
$uploadfolder = "uploads";
$add_prefix = "Yes";
$attach_files = "No";
$max_attach_size = "10";

$double_quote_fields = "Yes";
$csvSeparator = "comma ,";
$csvFile = "fomdata.csv";

$db_host = "localhost";
$db_name = "database_name";
$db_user = "username";
$db_password = "password";
$db_table = "table_name";
$create_table = "Yes";
$add_columns = "Yes";

$mail_engine = "SMTP";
$SMTPSecure = "No";
$SMTPHost = "Removed";
$SMTPPort = "25";
$SMTPAuth = "true";
$SMTPUser = "Removed";
$SMTPPass = "Removed";

$start_of_script_include = '';
$before_formdata_include = '';
$after_formdata_include = '';
$after_filedata_include = '';
$before_error_include = '';
$before_admin_mail_include = '';
$before_auto_mail_include = '';
$end_of_script_include = '';
$end_include = '';

// End of settings section
// Process form
include 'dbts_includes/dbts_formprocessor.php';
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>2019 Salvant Family Reunion Reqistration Fomr</title>
<meta name="generator" content="WYSIWYG Web Builder 12 - http://www.wysiwygwebbuilder.com">
<link href="wb.validation.css" rel="stylesheet">
<link href="Salvant.css" rel="stylesheet">
<link href="RegistrationForm2.css" rel="stylesheet">
<script src="jquery-1.12.4.min.js"></script>
<script src="wb.validation.min.js"></script>
<script>
function ValidateRegistrationForm(theForm)
{
var regexp;
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.Email.value.length != 0 && !regexp.test(theForm.Email.value))
{
alert("Please enter a valid email address.");
theForm.Email.focus();
return false;
}
return true;
}
</script>
<meta name="form_processor" content="DBTS WWB Form Processor v. 2.7.5.7">
<script>
$(document).ready(function()
{
$("#Form1").submit(function(event)
{
var isValid = $.validate.form(this);
return isValid;
});
$("#Last").validate(
{
required: true,
type: 'custom',
param: /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/,
length_min: '1',
length_max: '30',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: true,
font_family: 'Arial',
font_size: '13px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must have a Last name'
});
$("#First").validate(
{
required: true,
type: 'custom',
param: /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/,
length_min: '1',
length_max: '30',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: false,
font_family: 'Arial',
font_size: '16px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must have a First Name'
});
$("#Guest1, #Guest2").change(function()
{
$('#Total').val(Number($('#Guest1').val()) + Number($('#Guest2').val()))
});
$("#Guest1").trigger('change');
$("#Editbox4").validate(
{
required: true,
type: 'text',
length_min: '10',
length_max: '14',
color_text: '#000000',
color_hint: '#00FF00',
color_error: '#FF0000',
color_border: '#808080',
nohint: false,
font_family: 'Arial',
font_size: '13px',
position: 'topleft',
offsetx: 0,
offsety: 0,
effect: 'none',
error_text: 'Must enter valid Phone Number'
});
});
</script>
</head>
<body>
<div id="wb_Form1" style="position:absolute;left:57px;top:35px;width:900px;height:751px;z-index:20;">
<form name="RegistrationForm" method="post" action="<?php echo basename(__FILE__);?>" enctype="multipart/form-data" target="_self" id="Form1" onsubmit="return ValidateRegistrationForm(this)">
<select name="prefix" size="1" id="Combobox1" style="position:absolute;left:93px;top:43px;width:80px;height:30px;z-index:0;">
<option selected value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Miss">Miss</option>
<option value="Ms.">Ms.</option>
<option value="Dr.">Dr.</option>
</select>
<label for="Last" id="Label2" style="position:absolute;left:475px;top:14px;width:182px;height:18px;line-height:18px;z-index:1;">First Name:</label>
<label for="Email" id="Label4" style="position:absolute;left:511px;top:97px;width:56px;height:18px;line-height:18px;z-index:2;">Email:</label>
<label for="First" id="Label5" style="position:absolute;left:122px;top:163px;width:48px;height:18px;line-height:18px;z-index:3;">Guest1</label>
<label for="First" id="Label7" style="position:absolute;left:122px;top:199px;width:43px;height:18px;line-height:18px;z-index:4;">Guest2</label>
<input type="number" id="Guest2" style="position:absolute;left:32px;top:235px;width:190px;height:18px;line-height:18px;z-index:5;" name="Guest2" value="" tabindex="6" spellcheck="false" accesskey="6">
<input type="number" id="Total" style="position:absolute;left:595px;top:305px;width:60px;height:18px;line-height:18px;z-index:6;" name="Total" value="0" spellcheck="false">
<label for="First" id="Label3" style="position:absolute;left:183px;top:15px;width:182px;height:18px;line-height:18px;z-index:7;">Last Name:</label>
<label for="" id="Label8" style="position:absolute;left:56px;top:97px;width:109px;height:19px;line-height:19px;z-index:8;">Phone Number</label>
<label for="Combobox1" id="Label1" style="position:absolute;left:38px;top:45px;width:47px;height:18px;line-height:18px;z-index:9;">Prefix:</label>
<label for="" id="Label9" style="position:absolute;left:28px;top:276px;width:656px;height:21px;line-height:21px;z-index:10;">Additional Atttenees can be placed here.</label>
<input type="submit" id="Button1" name="" value="Send" style="position:absolute;left:775px;top:164px;width:96px;height:25px;z-index:11;">
<div id="wb_RadioButton2" style="position:absolute;left:351px;top:400px;width:20px;height:20px;z-index:12;">
<input type="radio" id="RadioButton2" name="Age" value="on" style="position:absolute;left:0;top:0;"><label for="RadioButton2"></label></div>
<div id="wb_RadioButton3" style="position:absolute;left:346px;top:441px;width:20px;height:20px;z-index:13;">
<input type="radio" id="RadioButton3" name="Age" value="" checked style="position:absolute;left:0;top:0;"><label for="RadioButton3"></label></div>
<input type="text" id="First" style="position:absolute;left:595px;top:17px;width:190px;height:18px;line-height:18px;z-index:14;" name="FirstName" value="" tabindex="2" spellcheck="false" accesskey="2" title="First Name" placeholder="First name">
<input type="text" id="Email" style="position:absolute;left:618px;top:78px;width:190px;height:18px;line-height:18px;z-index:15;" name="email" value="" tabindex="4" spellcheck="false" accesskey="4" placeholder="Email Address">
<input type="text" id="Editbox4" onchange="formatPhone(this.id, this.value);return false;" style="position:absolute;left:186px;top:97px;width:227px;height:25px;line-height:25px;z-index:16;" name="Phone" value="" maxlength="17" tabindex="3" spellcheck="false" title="Phone Number" placeholder="area code and phone number">
<input type="text" id="Last" style="position:absolute;left:183px;top:44px;width:190px;height:18px;line-height:18px;z-index:17;" name="LastName" value="" tabindex="1" spellcheck="false" accesskey="1" title="Last Name" placeholder="Last Name">
<input type="number" id="Guest1" style="position:absolute;left:204px;top:198px;width:190px;height:18px;line-height:18px;z-index:18;" name="Guest1" value="" tabindex="5" spellcheck="false" accesskey="5">
<label for="Total" id="Label6" style="position:absolute;left:284px;top:250px;width:79px;height:18px;line-height:18px;z-index:19;">Total Guests</label>
</form>
</div>
<div id="wb_Extension1" style="position:absolute;left:1202px;top:12px;width:120px;height:102px;z-index:21;">
</div>
</body>
</html><script>
function formatPhone(mID, gal) {
var t = gal;
var ID = mID;

var n = gal.length;
// alert(n);
var patForReqdFld = /^(\-)?([\d]+(?:\.\d{1,2})?)$/;
var patForOptFld = /^(\-)?([\d]*(?:\.\d{1,2})?)$/;

if (n <10){
// alert("yes less than");
var a = document.getElementById(ID);
a.value ="";
return;
}
// alert(n);

if(patForReqdFld.test(t)){
// alert("Yes");
t = "(" + gal.substr(0,3) +") " + gal.substr(3,3)+ "-"+ gal.substr(6,4);
var a = document.getElementById(ID);
a.value =t;
}
else
{
var a = document.getElementById(ID);
a.value ="";
}

}

</script>

User avatar
Navaldesign
 
 
Posts: 1008
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Form CSV files

Post by Navaldesign » Sun Jan 21, 2018 8:13 pm

Your file seems incomplete (starts with a comma, as if the starting part is missing) and also corrupted (in the last line not all titles exist.

Please delete the CSV file from the website using FTP and make a fresh new start to see if the file is correctly created and updated with each submission.
www.dbtechnosystems.com

davidflash
 
 
Posts: 28
Joined: Fri Jul 17, 2015 8:25 pm

Re: Form CSV files

Post by davidflash » Mon Jan 22, 2018 12:39 am

Perfect, That did it. csv file got corrupted.

Sorry for the trouble, Thanks a thousand times.

David

Post Reply