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