close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Custom HTML Form

Thread began 12/15/2010 12:52 am by rmruda390861 | Last modified 12/16/2010 7:13 am by Jason Byrnes | 1197 views | 3 replies |

rmruda390861

Custom HTML Form

Using Universal Email 4 to send email from a form created with CSS Form Builder 1.x
Everything works fine with the standard email template (used block.php) but since this is not very clean I designed my own form using DW html from within your app..
All the fields I needed came out on my HTML form OK except for the field which is type "list" (has a number of products to choose from)
Now there is a difference in the code for this list field when I drag if from the Bindings panel
(see Product below, below Telephone - telephone works fine)
You can see that Product has an extra [].
If I manually remove the [] the form is emailed with the word "Array" in the product field which makes sense
If I leave it with the [] then the form is emailed empty in the product field
How do I bind the field which I guess is or could be an array of more than one product??
I also see in the preview panel within Universal email, "Dynamic Value" appears next to product..
You template form block.php handles the products field just fine by listing one product after the other..
<td>Telephone</td>
<td><?php echo ((isset($_POST["Contact_Us_group_Telephone"]))?$_POST["Contact_Us_group_Telephone"]:"")?></td>
</tr>
<tr>
<td>Product</td>
<td><?php echo((isset($_POST["Contact_Us_group_Product[]"]))?$_POST["Contact_Us_group_Product[]"]:"") ?></td>
</tr>
<tr>

Thanks
Richard

Sign in to reply to this post

Jason ByrnesWebAssist

a multiple select list creates an array of the selections that where made.


the default template has code in place to convert the array to a comma seperated list using the implode() function.


you will need to edit:

php:
<?php echo((isset($_POST["Contact_Us_group_Product[]"]))?$_POST["Contact_Us_group_Product[]"]:""?>




to:

php:
<?php echo((isset($_POST["Contact_Us_group_Product"]))?implode(", "$_POST["Contact_Us_group_Product"]):""?>





to convert the array.

Sign in to reply to this post

rmruda390861

Jason,
Thanks it worked fine.
Just want your comment on point 1 but documenting point 2
1) With testing the emails are not consistently arriving - I am testing with emails being sent to gmail. Some are caught in Spam which is OK but others are not arriving at all. (surely gmail are not dropping some of these totally??). Perhaps if too many are sent over a short period of time then gmail assumes a spider of sorts. Opinion please?
2) The file I edited "contact_WAUE_HTML_WA_Universal_Email_1.php" disappeared after the first form send after editing your changes (local and on server (or was not visible for some reason - I checked carefully) and of course the email did not arrive the 2nd time I tried thsi because the file was not there.
I open up Universal Email again, clicked on DW to edit and it loaded in the window again showing the saved changes but after saving again it did not show in any file browse???. I closed DW completely and opened again and all appears normal now.
Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

1) I dont think the issue is with gmail, it is more likely an issue with the smtp server being used. to determine why the smtp server is not relaying some of the emails, you would need to contact the host to have them look into the smtp server error logs.


2) I have no idea why the file would not be in the Dreamweaver file browser, but it seams that restating Dreamweaver fixed the problem.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...