***UPDATED*** DB Technosystems Form Processor 02/09/2011

In this section you can share self-made extensions with other users of WYSIWYG Web Builder.

There are already more than 250 extensions available!
User avatar
Patrik iden
 
 
Posts: 535
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Patrik iden » Sun Apr 14, 2013 7:39 pm

Hello, i'. tryimg to make an own captcha, and i hav this code in an external file (verify.php)
Ware shold i include the file in the Form processor?

Thank you.

Code: Select all

<?php
session_start();

if($_POST['s3capcha'] == $_SESSION['s3capcha'] && $_POST['s3capcha'] != '') {
    unset($_SESSION['s3capcha']);
 header('location: thankyou.html'); 
} else {
 header('location: error.html');
}  

?>

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

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Navaldesign » Sun Apr 14, 2013 8:47 pm

I don't know what your "verify.php" file does, nor how you are passing the verification value to the processor. In all cases, the verification routine should go in the "Before Error Reporing Custom Processing".
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 535
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Patrik iden » Sun Apr 14, 2013 8:58 pm

Thank you. Dat did not work. I'm getting redirected to thanks.html page even if i put in the wrong captcha.
Now i got it to work if i set the WWB form action to verify.php, but then of course the email process is not functioning.

thank you.

Regards.

//Patrik.
Last edited by Patrik iden on Sun Apr 14, 2013 10:12 pm, edited 1 time in total.

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

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Navaldesign » Sun Apr 14, 2013 9:04 pm

I'm sorry, I don't have the time to impement third party scripts in my processor, you will need to find out yourself what you are doing wrong. The instructions I gave you (implementing the vrification routine just before the Error Reporing) is correct.
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 535
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Patrik iden » Sun Apr 14, 2013 10:11 pm

Navaldesign wrote:I'm sorry, I don't have the time to impement third party scripts in my processor, you will need to find out yourself what you are doing wrong. The instructions I gave you (implementing the vrification routine just before the Error Reporing) is correct.
ok, do you see somthing wrong with the verification code?, it do not work
i gues i'm verifing this:

Code: Select all

<?php

session_start();

include("s3Config2.php");

$rand       = mt_rand(0,(sizeof($values)-1));

shuffle($values);

$s3Capcha = '<p><span style="color:#4B4B4B;font-family:Open Sans Condensed Light;font-size:16px;">Verify that you are a human,  please choose:  <strong>'.$values[$rand]."</strong></span></p>\n";

for($i=0;$i<sizeof($values);$i++) {

    $value2[$i] = mt_rand();

    $s3Capcha .= '<div><span>'.$values[$i].' <input type="radio" name="s3capcha" value="'.$value2[$i].'"></span><div style="background: url('.$imagePath.$values[$i].'.'.$imageExt.') bottom left no-repeat; width:'.$imageW.'px; height:'.$imageH.'px;cursor:pointer;display:none;" class="img" /></div></div>'."\n";

}

$_SESSION['s3capcha'] = $value2[$rand];

echo $s3Capcha;

?>

User avatar
Patrik iden
 
 
Posts: 535
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Patrik iden » Mon Apr 15, 2013 1:47 am

I'v got it working now. Thanks anyways.

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by tdr » Sat May 18, 2013 9:49 am

HansInChina wrote:DBTS - csv file has unnecessary characters

To George (Navaldesign)

I found unnecessary characters in the csv file. As I am not sure if this is caused by the DBTS Form processor I took the time to copy the contents of the file below.

I would like you to examine the output and let me know whether or not this is by design.
If so, I would like this to be corrected.

Here is a copy of the csv-file contents:
The field headers (these are OK)
Time of Submission,Timestamp,IP Address,Selection,First Name,Last Name,Email,Country,Msg Text,Fileupload

Then the field values
  • To easily distinguish the field values from each other, I surrounded them by double quotes.
    The spaces and other characters that should not be there are underscored in red.
    Most (!) values start and end with a space that was not entered by the user.
    Curiously the Timestamp value is not surrounded by spaces.
    Note the double slash in the middle of the URI.
    The last value (of Fileupload) this time ends not with a space but with an end-of-line.
    The last characters at the end of this record are: a space and end-of-line.
"_2012-05-18, 13:54:32 CST (+08:00)_","1337320472","_112.112.190.85_","_question_","_Hans_","_van Unen_","_h@unen.com_","_China_","_This is a live test._","_http://www.my domain-name.com//contact-whcw/986974_testform.txt"_↵

Kind regards,

Hans
I'm having the same problem here..did you manage to fix this?

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

Replace CRLF on text area

Post by tdr » Sat May 18, 2013 12:19 pm

Is there a way with DBTS Form Processor to strip out CR & LF in a text area field, and replace them with a space? Currently the administrator email formatting gets messed up because of user input using CRLF.
DBTS preview seems to quite happily strip out CRLF using '.stripslashes($fieldname)', but I'm lost as to how to do it outside of this to get the email formatting working properly.

Any pointers would be much appreciated!

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

CSV header row problem

Post by tdr » Sat Jul 27, 2013 8:09 am

I'm using DBTS form processor 2.7.5 with WB 9.0.4 and I'm having a problem When DBTS appends additional fields to an existing CSV file.
I've set DBCS to use semicolon and double quotes for the CSV file.

When it appends new field names to the header row, it is inserting them using quotes and spaces as follows:

original csv file row 1:
date;timestamp;IP Address;field1;field2;field3

now the csv file row1 looks like this:
date;timestamp;IP Address;field1;field2;field3;" field4 ";" field5 ";" field6 "

Also notice insertion of leading and trailing spaces whenever double quotes are used for any field contents in the CSV - is this also a bug?

thanks much

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

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Navaldesign » Sat Jul 27, 2013 4:32 pm

Probably the original file was created with a previous version ?

Version 2.7.5.6 uses quotes and also spaces to allow preserving line breaks (as, in example, a text typed in a text area with line breaks) which would otherwise get lost.
You can disable the "Use double quotes" property, but only if your form doesn't allow line breaks.

The additional fields, having been created by the new version, uses this style, whilst the old fields (created by an older version) are kept as they are.

You can download the CSV, edit the first row in Notepad, (not in Excel) then upload it again.

If you are using the file on the server with the DBTS CSV Manager to display content, I suggest that you add quotes and spaces to everything, or remove quotes and spaces completely, as the CSV Manager can only deal with one type of content, not mixed.
www.dbtechnosystems.com

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by tdr » Sat Jul 27, 2013 9:23 pm

When I saw the problem I deleted the CSV file to let the script create a fresh copy. I then did a few form submits:

The first form submit creates the CSV with header row as I expected - no double quotes or spaces, just the semicolon. Row 2 of data has double quotes and spaces - again as I expected.
I then did a second form submit answering different questions on the form so that it would force appending of fields to the header row. These appended field names have the double quotes and spaces.

So if the latest version of DBTS is to use double quotes and spaces everywhere, then the problem seems to be on CSV first instance creation?

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

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Navaldesign » Sat Jul 27, 2013 10:43 pm

Yes, in fact. So please let the script create the file from scratch, but with the full list of fields.
www.dbtechnosystems.com

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by tdr » Tue Aug 06, 2013 1:17 pm

I'm having trouble testing for an empty text box using DBTS preview and need to sanity check that I'm following the right steps:

My form uses DBTS form processor & DBTS reCAPTCHA.
I have a textbox named field1. Initial value of field1 is set to <?php echo $field1;?> so that I can preserve the data should the user make a reCAPTCHA error.
On submit, I redirect to a success page with DBTS preview and am using a custom layout using '.$Field1.' text.

What I want to do is to test whether field1 has data in it or has been left blank. So I have set the text object HTML as follows:

Code: Select all

<?php
If ($Field1 == ""){
$Field1 = "no data entered";
}
';
?>
However this If statement does nothing. I've also tried isempty() and strlen() tests but none of these work. Any advice on what I am doing wrong?

thanks

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

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by Navaldesign » Tue Aug 06, 2013 4:56 pm

But why are you doing this ?

DBTS Form Processor allows you to do this automatically: Properties, Section D. Behavior -> Null fields text
You must also set the property "Include null fields" to "Yes" instead of the default "No"

So the processor will "pass" to the Preview Page, the value "No data entered" (or whatever else you wish) for field1.
www.dbtechnosystems.com

tdr
 
 
Posts: 28
Joined: Sat Sep 26, 2009 10:14 am

Re: ***UPDATED*** DB Technosystems Form Processor 02/09/2011

Post by tdr » Wed Aug 07, 2013 11:29 am

Thanks Navaldesign - I appreciate the help.

I did have the null fields set to No in Section D, so I've now set this to Yes. I also added "no entry" text. I've also temporarily set the DBTS preview to show me the field table.
What I'm seeing now is that the blank fields remain blank in DBTS preview. The admin email however does show the "no entry" text.
Is there another setting I've missed?

regards

UPDATE: I've created a 1 page website with 1 field to illustrate my problem, so if you would like me to upload it somewhere to take a look at this problem let me know.

Post Reply