Page 42 of 51

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

Posted: Sun Apr 14, 2013 10:11 pm
by Patrik iden
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;

?>

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

Posted: Mon Apr 15, 2013 1:47 am
by Patrik iden
I'v got it working now. Thanks anyways.

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

Posted: Sat May 18, 2013 9:49 am
by tdr
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?

Replace CRLF on text area

Posted: Sat May 18, 2013 12:19 pm
by tdr
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!

CSV header row problem

Posted: Sat Jul 27, 2013 8:09 am
by tdr
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

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

Posted: Sat Jul 27, 2013 4:32 pm
by Navaldesign
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.

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

Posted: Sat Jul 27, 2013 9:23 pm
by tdr
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?

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

Posted: Sat Jul 27, 2013 10:43 pm
by Navaldesign
Yes, in fact. So please let the script create the file from scratch, but with the full list of fields.

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

Posted: Tue Aug 06, 2013 1:17 pm
by tdr
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

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

Posted: Tue Aug 06, 2013 4:56 pm
by Navaldesign
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.

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

Posted: Wed Aug 07, 2013 11:29 am
by tdr
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.

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

Posted: Mon Aug 26, 2013 12:15 pm
by tdr
Navaldesign wrote: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.
Any update on this please? I am not seeing this on DBTS preview - null fields remain blank and are not picking up "no data entered" from DBTS form processor section D. This could be why I haven't been able to test for empty / null text boxes (see my post above). If I test for known values of text boxes, everything is fine, but no matter what I try, I can't seem to test for an empty field so that I can substitute it with meaningful text on success page.

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

Posted: Mon Aug 26, 2013 4:28 pm
by Navaldesign
At the moment, I can't recall if DBTS preview takes into account null fields or not.

But due to personal work, un update on this will not be available soon.

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

Posted: Mon Aug 26, 2013 10:18 pm
by tdr
Hi Navaldesign
I understand and appreciate your position - DBTS is a terrific extension and I expect that a large number of people are in your debt for your excellent contributions to WB.

Furthemore, I don't immediately need DBTS preview to pickup the null fields and populate with the replacement text from form processor. This can wait.

My problem is more specific and I was hoping it's just my poor PHP skills coming into play:
I know the input box contents are being passed to the page with DBTS preview because I can test for specific content and it works fine. Thus if I type "123" into the input box and test for that content, the PHP if statement works fine. It's when the input box is in an empty state that none of my attempts to test for this condition works. I've tried isset, empty, is_null, zero string length with trim etc and none of these resolve correctly. So maybe somebody else with better PHP skills than me can do a quick test? I've built a 1-pager WB site with a single field to illustrate my point - so it's would just be a matter of checking if my logic is wrong. Any takers?

thanks
Tony

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

Posted: Tue Aug 27, 2013 1:22 pm
by Navaldesign
Please email me your project as well as the specific URL of the published page.