Page 6 of 16

Posted: Sat Jan 16, 2010 6:52 am
by Navaldesign
Hi Darren,

Which version of the processor do you have ?

There has been a version, (2.1.6 if i recall) which had a bug regarding the attachments. It had been fixed on the 2.1.7 version.

If you have an older version, pls update.

If you are using the latest version, the only possible explanation is that you have set wrong filename or wrong path to the file.

In which folder do the files reside ? and how did you type the file names in the extension ?

If none of the above solves the issue, pls forward me you project.

Posted: Sat Jan 16, 2010 3:57 pm
by Navaldesign
All variables and values are contained in an array named $PREVIEW
To see the variables names and values add the following in a HTML box in your page:

<?php
print_r($PREVIEW);
?>

It will display all variable pairs (name / value) available.

Posted: Sun Jan 17, 2010 12:34 pm
by DarrenH
Thank you George

Updated to latest version and working perfectly.

Outstanding extension.

:D

Substitute different text for field value using DBTS preview

Posted: Sun Jan 24, 2010 6:22 am
by tdr
Is it possible to show substitute text for a field value when using DBTS preview on a page?

I explain my question using a very trivial example:

On a form I have a check box for colour. The name of the color is "powder coat midnight blue". I store the color in a CSV file, and rather than store the long string of text, I would prefer to store something shorter, say colour code = 1234. The check box is optional, so it can also default to no value.

On clicking submit, I would then like to bring up a success page using DBTS preview, and have meaningful custom text e.g. "you selected power coat midnight blue" (not the stored field value of 1234).

Is this possible? I have tried to use a PHP If statement in the "before HTML" section of the text block, but not having any luck.

Any advice would be much appreciated.

Posted: Sun Jan 24, 2010 7:35 am
by Navaldesign
Use the Short form for the color, in the form field.

I will assume that the checkbox name is "colour".

Since the submission has already taken place, (Preview used only as confirmation) then you should simply add some code in preview object HTML, Before Tag:


<?php
if ($PREVIEW['colour'] != ""){
$PREVIEW['colour'] = "replacement text";
}
?>

If you have in the future multiple colours to select from using radio buttons, the code should be:


<?php
$colours = array("1234" => "powder coat midnight blue", "1235" = "another colour", "1236" => "yet another one")
$PREVIEW['colour'] = $colours[$PREVIEW['colour']];
?>

Posted: Sun Jan 24, 2010 7:05 pm
by Navaldesign
Hm.... It works perfectly ????? What's your issue ?

Posted: Mon Jan 25, 2010 6:20 am
by Navaldesign
They do render fine, this is not what I mentioned.

CSVs that use comma as delimiter, will open fine in excel, BUT each line (=each data row) will be in a single column in Excel.

CSV's that use ; as delimiter will open also, but each separate value of each data row will be in each own column, thus making further processing much easier. So if you hav (just an example) fields "first name", "last name", "address" etc, each field values will be placed in a separate column.

Posted: Mon Jan 25, 2010 11:28 am
by tdr
Navaldesign wrote:Use the Short form for the color, in the form field.

I will assume that the checkbox name is "colour".

Since the submission has already taken place, (Preview used only as confirmation) then you should simply add some code in preview object HTML, Before Tag:


<?php
if ($PREVIEW['colour'] != ""){
$PREVIEW['colour'] = "replacement text";
}
?>

If you have in the future multiple colours to select from using radio buttons, the code should be:


<?php
$colours = array("1234" => "powder coat midnight blue", "1235" = "another colour", "1236" => "yet another one")
$PREVIEW['colour'] = $colours[$PREVIEW['colour']];
?>
Thanks Navaldesign, as always terrific support from you.

I did a slight variation on above in case others have a similar need:
I applied the if statement to custom text rather than the DBTS preview object. So I have a line of text which says "you selected colour '.$Colour.'

The before tag has:
<?php
If ($Colour != ""){
$Colour = "replacement text";
}
echo '

and the after tag has:
';
?>


By the way - I haven't noticed this before - my checkbox name is colour (with lowercase c). I notice DBTS preview capitalises the first letter...is this normal?

thanks

Posted: Mon Jan 25, 2010 12:10 pm
by Navaldesign
Yes, it is, because DBTS Form Processor capitalizes the first letter of each field name and replaces underscores (by default added during the submission process) with whitespaces. This allow a better look of the field names.

Posted: Tue Feb 02, 2010 9:03 pm
by Navaldesign
I would need the codes of the page and that of the success page, if you wish you can send them to me (as text files) through my site contact form.

Posted: Thu Feb 04, 2010 3:37 pm
by kevinp
Hi Naval

I too seem to be having problems with the preview page not showing the submitted data in 'free layout' variables.

I have entered everything as in the manual

Code: Select all

<?
echo '<font style="font-size:15px" color="#282828" face="Arial">Thank you for contacting us</font><font style="font-size:15px" color="#000000" face="Arial"> '.$Name.'.</font><font style="font-size:15px" color="#282828" face="Arial"> <br>
<br>
You have submitted a '.$Formtype.'. <br>
We will review the information you sent and get back to you as soon as possible.</font>';
?>
and it just gives blanks where the information should be.

If I use table layout then the info shows so I know it's being passed over.

The form has only stoped working since I updated the processor (2.1.8), preview (still v 1.0) and my version of WB (6.5.5) and re-published my files.

The emails send OK

Thanks

Kev

Posted: Thu Feb 04, 2010 4:10 pm
by Navaldesign
Hi Kevin,

please forward me the project OR post somewhere the page code so I can see what the issue might be.

Before doing so, you can update the preview object and see if it works. I have made some updates due to the release of WB6.5. but the version number is the same.

Also, you can try adding the following code in the page (in a html object) AFTER (in the code) the preview object:

<?php
print_r($PREVIEW);
?>

This will echo the $PREVIEW array in your page, so you will be able to see the field names and adapt your own code.

Please note that you need not add the <font.....> code to format your text.

If, in example, you need to display the $Name, add the following text in your page:

Hello '.$Name.', we have received your info'

Format it with the font and color you llike, ditectly in WB. Right click it and place the following code in the text html:

Before Tag:

<?php
echo'

After Tag:

';
?>

So the formatiing is actually done as with any other WB6 text. Only take care to make any formatting of the variables part OUTSIDE the quotes ' or it will cause a syntax error.

Posted: Thu Feb 04, 2010 4:49 pm
by kevinp
Thanks Naval

I did all that initially. I updated the preview with the processor and tried adding the html box with

Code: Select all

<?php 
print_r($PREVIEW); 
?> 
It gave the results

Code: Select all

Array ( [formid] => 1 [name] => kevinp [email] => hhhh@sjsjsj.com [help] => [formtype] => Quick Contact Form )
so I know the variables are being passed over but seem not to be showing in the free layout. I've even tried upper and lower case variables.

This is my page layout on the preview page:

Image

and you can see it in action at

http://www.primal-design.co.uk/index.php

I'm sure I've missed something simple out but it's got me baffled at the moment.

Thanks for your help Naval. As always, you're a superstar.

Kev

Posted: Thu Feb 04, 2010 4:54 pm
by Navaldesign
Probably the text is BEFORE the Preview object, when variables have not yet been extracted from the $PREVIEW array. Right click and "Move to Front" the text.

Posted: Thu Feb 04, 2010 5:42 pm
by kevinp
That was the problem. It works fine now.

Thanks for your time Naval

Kev

New to Forms

Posted: Wed Feb 10, 2010 10:37 pm
by jsavage
I am new to Forms and Processing. And LOVE what you have done here.
I need to create a "Questionnaire" form. I have setup the basic elements of the DBTS form processor and an associated database that it will push into, but I have never actually built a form before. And need a better understanding of how to "hook it all together" I am looking for a tutorial that will help me understand what I need to do on the forms side to get it all to work with properly with the DBTS, and WB 6.

Thanks

SAVAGE

Posted: Thu Feb 11, 2010 6:10 am
by Navaldesign
Did you have a look at the Forms Tutorials ? http://www.wysiwygwebbuilder.com/forms.html

Also, while you are in WB6, clcik on Help -> Help Topics -> Forms which will display the relevant chapter with details on each control properties.

Posted: Thu Feb 11, 2010 7:04 am
by jsavage
I did go through all of the Forms tutorials.
I will go through all that before I post any questions. I have not completed my form yet, but I was just feeling like I was missing some sort of link between the forms and your plugin. Basically there were no examples that detailed out "This is how you hook this form to the DBTS plugin.

Let me review all of the Help area elements and then come back and ask questions.

Thank you...

Posted: Thu Feb 11, 2010 8:15 am
by Navaldesign
You asked about the forms tutorial, and this is the reason I posted the above link.

To understand, instead, how to process the form with the DBTS Form Processor extension, just read the manual, it is ALL explained step by step.

Basically, you simply need to add the form processor object in your page, set its properties, and set the form action as per manual.

Posted: Thu Feb 11, 2010 7:11 pm
by jsavage
Yes, I apologize, I went through the tutorials on the forum, but was hoping there was a tutorial that specifically walked through setting up DBTS with a form.

The part I missed is understanding how to set the (WB) form options per the (DBTS) manual. The manual does a great job in helping to understand how to set up your plugin (Which is fantastic). I have that set, but is not very clear on how to set up the WB Form to hook into the DBTS plugin. Maybe it is all automatic and I am worried about something that is irrelevant.

Again, thank you for your response. I appreciate the guidance.

SAVAGE

Posted: Thu Feb 11, 2010 7:20 pm
by Navaldesign
Yes, it IS automatic. Just set the form processor properties, set the form action as per manual, AND, I recommend, set the formid number (both in the form and in the processor properties), the rest is automatic.

Posted: Thu Feb 11, 2010 7:43 pm
by jsavage
Fantastic.. Thanks again, and I appreciate your willingness to put up with my lack of knowledge..

Posted: Thu Feb 11, 2010 9:14 pm
by jsavage
Time for new questions.
I have inserted the table, and all of the form elements into it. I set up the DBTS plugin what I believe is in a correct way, however, when I process the form, It sends me to the "Error" page, without any reason why I am going there.
Where should I start to troubleshoot the problem?

Posted: Thu Feb 11, 2010 9:41 pm
by Navaldesign
A link please ?

Did you crete the error page correctly (with the text ##error## ) so it will display the error ?

Posted: Thu Feb 11, 2010 9:43 pm
by jsavage
I will email you @ Info...

Posted: Thu Feb 11, 2010 10:15 pm
by Navaldesign
Please keep it within the forum limits, I can not afford the time / effort for private / individual help. Also, without link (pass protected) I can't see much of your form...

Solved

Posted: Fri Feb 12, 2010 3:31 am
by jsavage
Problem solved. it was not that I was missing anything, I used a "$" in the password for the database user, and that was messing things up. I was your coments in the manual and did not realize that it extended to passwords. so, in the end it was user error...

Thanks for the help

SAVAGAE

***UPDATED*** DB Technosystems Form Processor 16/02/2010

Posted: Mon Feb 15, 2010 8:18 pm
by Navaldesign
This is a maintanance update.

The extension has been updated, and will no more create the problem in XHTML Transitional Document types.

Included in the zip you will now find also the unicode version files (.uwbx)

Tested in both WB6 and WB6 Unicode versions.

Extensions compiled in Extension Builder 2.0.3.

Problem with Yahoo hosted site

Posted: Mon Feb 22, 2010 9:14 am
by harville
Hello, I'm trying to use this extension with a yahoo hosted site and I'm having trouble.

I keep getting an error code: EMAIL FAILED Mailer Error: Language string failed to load: connect_host

I've tried everything I know to do and no luck. Any suggestions are greatly appreciated! Thanks!!

Posted: Mon Feb 22, 2010 9:19 am
by Navaldesign
Did you try sending the email using only the mail() function ?

If this fails, you should ask your host what's the SMTP host and use SMTP mail.

Posted: Mon Feb 22, 2010 9:30 am
by harville
If I use the mail() function do I need to fill out the rest of the smtp info?

Also, from what I've read so far it looks like Yahoo requires smtp info with ssl and port 465.

I'm having trouble finding a clear answer on what the Yahoo smtp host is and if phpmailer will even work in a yahoo hosted site.

If you have any feedback I would be very greatful. Thanks!

Posted: Mon Feb 22, 2010 9:57 am
by Navaldesign
The extension itself allows you to use SMTP and set the correct port. However you need to know what the SMTP host is.

I' not familiar with Yahoo hosting. I recall that you CAN use the mail() function but there are certain conditions (which I can't recall)

Posted: Mon Feb 22, 2010 12:48 pm
by BaconFries
@Harville
Yahoo! Mail Settings
Yahoo Mail offers standard POP3 access for receiving emails incoming through your Yahoo mailbox, by using your favorite email client software. To setup your email client for working with your Yahoo account, you need to select the POP3 protocol and use the following mail server settings:

Yahoo Incoming Mail Server (POP3) - pop.mail.yahoo.com (port 110)
Yahoo Outgoing Mail Server (SMTP) - smtp.mail.yahoo.com (port 25)

POP Yahoo! Mail Plus email server settings
Yahoo Plus Incoming Mail Server (POP3) - plus.pop.mail.yahoo.com (SSL enabled, port 995)
Yahoo Plus Outgoing Mail Server (SMTP) - plus.smtp.mail.yahoo.com (SSL enabled, port 465, use authentication)

maybe this will help in someway.....

Posted: Mon Feb 22, 2010 1:03 pm
by Navaldesign
So try using SMTP mail engine, smtp.mail.yahoo.com as SMTP host, Port 25.

Thank you Baconfries :D

Posted: Tue Feb 23, 2010 1:53 am
by harville
I decided to just point the Yahoo hosted domain to MY hosting account instead of using Yahoo.

This works, but the autoresponder doesn't work unless the email address is registered through my hosting account. It gives me an error otherwise.

I found that if I change the name from 'email' to something else, the form sends like it should, but will not send an autoresonded email

I think this all has to do with Yahoo, but I'm not sure. Any suggestions?

Posted: Tue Feb 23, 2010 6:34 am
by Navaldesign
This is a condition that I have encountered with GD accounts, because there is a restriction as to what email addresses can be used as "from". Usually addresses with yahoo, google mail, hotmail are not accepted as "from" for the main mail. Consequently, you need to change the "email" field to something else, so that your own email address is used as "from". Of course, this disables the autoresponder, as it sees no "email" field.

Solution:

You need to use the extension includes, to set the "from" and "reply to" addresses. Here are the steps:

1. In the last section of the processor properties, the Includes, add the following:

in the Before Admin Mail Include URL type: dbts_includes/set_real_mailfrom.php

In the Before Autoresponder Mail Include URL, type: dbts_includes/set_mailfrom.php


Now, copy, one at a time, the following codes in Notepad, and follow instructions:

First code:

Code: Select all

<?php
$real_mailfrom = $mailfrom;
$mailfrom = $from_email;
?>
Paste it in Notepad, and Save As -> File type: All files -> save it as "set_real_mailfrom.php"

Second code:

Code: Select all

<?php
$mailfrom = $real_mailfrom;
?>
Copy it in Notepad, Save As -> File Type: All Files -> save it as "set_mailfrom.php"

Upload these two files in the dbts_includes folder that has been created on your site.

Set, in the processor, all "from" email addresses to be email addresses within your own domain.

form issues

Posted: Sat Feb 27, 2010 8:25 pm
by clubfred
HI Naval, haven't been in here since you saved my ass, with the form code for my new website.

I'm trying to get this new form extension to work as it is what my client wants, nice layout of form info etc.

I have gone through the tutorial and step by step entered all the info, but I must be missing something.

Please have a look.
http://67.222.21.208/formtest.php

Cheers
The Fred

Posted: Sat Feb 27, 2010 8:40 pm
by Navaldesign
Please change the form action as per manual: "<?php echo $_SERVER['PHP_SELF'];?> " or simply change it to "formtest.php"

Posted: Tue Mar 02, 2010 11:10 pm
by clubfred
Still trying to get it right.

I'm able to get the form to work most of the time, but still getting errors and the emails that come in from the form almost always get sent to spam.
It sure is a nice form when it comes through, very nice layout.
But I get all the info bunched together in the body of the email, the attachment has the nice layout.

In the manual it is not clear whether I use a "form properties object" as well as the "dbts form processor, on the same page.
It seems as though I need to, but information between the 2 is conflicting.

Does the dbts form processor have to be in the "form properties object" area?

And if I do use the from properties object, do I still set it to
"use built in PHP form processor to send the data to an email address"

Thanks Naval designs
The Fred

Posted: Wed Mar 03, 2010 6:21 am
by Navaldesign
1. There is no reason why the processor should be successfull sometimes and not successfull in other occasions. I can only suppose that your ISP blocks the mail for some reason.
2. Some Hosting companies will not allow mails to be sent if the "From" address is (as happens here) one that is not within the domain. This is because the visitor's email address is used as "From" and can be anything. At the moment this can only be solved through the instructions provided in my post just above yours.
3. Not sure what you mean by "Form Properties Object". If you mean "Form Object", then Yes, you need to use a Form Object, on which you need to add your form fields, and separately add the DBTS Form Processor object. This doesn't need to be on the form, can be anywhere.
4. No you should NOT check the "Use Built in Form Processor" checkbox, otherwise BOTH processors will be activated. This may cause conflicts, and you will probably also receive double emails, one from each processor

Posted: Wed Mar 03, 2010 4:21 pm
by clubfred
Thanks Naval, this clears up a lot of questions.

Can't wait to get to Italy and take you for dinner.
We have friends in Rome and Milan.

Cheers
Fred

Posted: Tue Apr 27, 2010 9:10 pm
by Navaldesign
Obviously, if the admin mail works well, the hosting company has no limitations. I need to know your settings though.

Pls note that some hosters (GD mainly) put administrative limitations to the use of certain free email accounts (yahoo, gmail, hotmail etc) when used as "from" for the mail. If you have used such an email address as admin email address, please change it and test again.

Can you post the link so I can test the form ?

Posted: Wed Apr 28, 2010 5:50 am
by Navaldesign
The visitors email address field is named "Email" instead of all lowercase "email" so it is not recognized as such and this is the reason that no autoresponder mail is sent.

Posted: Wed Apr 28, 2010 9:58 am
by Navaldesign
The problem is the quote ' in your text, as ' has a special meaning for php.
Quotes need to be backslashed.

Simply change your text in:



Gentile cliente, le confermiamo di aver ricevuto correttamente l\'ordine da Lei effettuato.

Posted: Wed May 05, 2010 3:18 pm
by me.prosenjeet
Naval,
See this form here:
http://inzahost.com/contactus.php
The form has been configured to send mail to 2 email ids, one to me at: meDOTprosenjeetATgmailDOTcom and another to peterATblueacresDOTcoDOTza
However, when a form is submitted, I get the copy of the same but not the other email id.
Any suggestions?

Posted: Wed May 05, 2010 3:38 pm
by Navaldesign
Hi me,

I can see only a few reasons for this:

1. You have something else other than a comma between the two email addresses
2. The second mail is blocked somehow either by ISP or email client filters.

I suggest that first you check the separator between the two emails (only "," no whitespaces) and, as a second test, you add, as third email address, the meDOTprosenjeetATgmailDOTcom and see if you recieve the mail twice in this email address. If you do, then the mail IS sent by the script but not recieved.

I also suggest that you look in your webmail for delivery failure messages from the server regarding the peter@........ address.

Posted: Wed May 05, 2010 4:25 pm
by me.prosenjeet
Naval,
Thanks for your quick reply. I have checked the "," thing and there is no issue, I didnt leave any blank space also. I have asked Peter to check for the server settings...will update

Posted: Wed May 05, 2010 4:32 pm
by Navaldesign
Did you try my second suggestion about adding your email address as third email address and see if you recieve the mail twice ?

Posted: Wed May 05, 2010 5:17 pm
by me.prosenjeet
Navaldesign wrote:Did you try my second suggestion about adding your email address as third email address and see if you recieve the mail twice ?
Naval, I added my gmail address then Peters address then my yahoo address. I am getting the data on both my addresses but Peter isnt.

Posted: Wed May 05, 2010 7:01 pm
by Navaldesign
So obviouslythe mail IS sent but not recieved. This can only be due to his ISP or spam filters