close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form info repeating in email after modifying the block template

Thread began 5/01/2010 2:40 pm by elevy388997 | Last modified 5/14/2010 6:03 pm by Eric Mittman | 2104 views | 7 replies |

elevy388997Beta Tester

Form info repeating in email after modifying the block template

Hello,

I have a working contact form but when I get the email I have every field sent to me 3 times. It will send all the information once, then repeat, then repeat. So for example: Name, Email, Comments. Then below that, Name, Email, Comments...etc

If I leave the "default block" email page settings, it sends the email fine, no replication BUT in front of the field names is the name of the form. So instead of seeing "Name: Ed", I get "Contact_me_group_Name: Ed".

Sign in to reply to this post

Eric Mittman

Please post back with the page in question and a copy of your webassist folder from the site. I would like to see the page with the form on it and the file used for the message body to get a better idea of what is going on.

Sign in to reply to this post

elevy388997Beta Tester

Here is the page with the contact form on it:
contactus.html

Here is the contact form:
framecontactus.php

This is the email i get:

"Form Submitted 5-9-2010 | 11:11 PM EDT

Name:Brett Levy
Email:Test@email.com
Comments: Test comments box for the contact form and I am making it longer to see how it looks in the email that gets sent.
Name:Brett Levy
Email:Test@email.com
Comments: Test comments box for the contact form and I am making it longer to see how it looks in the email that gets sent.
Name:Brett Levy
Email:Test@email.com
Comments: Test comments box for the contact form and I am making it longer to see how it looks in the email that gets sent.

"

Sign in to reply to this post

Eric Mittman

Ok, in the template file it is still setup to loop over the individual elements that are posted. So you will see the info repeated for each posted element. To make it so you only see the info once you will want to remove the code that is in webassist > email > templates Block.php on lines 43-46 and lines 55-58.

Here is a copy of the page minus these lines, it should give you the result you are looking for.

Attached Files
Block.zip
Sign in to reply to this post

elevy388997Beta Tester

Hmm, I copied over my Block file with the one you attach and it still sends me 3 sets of data. When I looked at the file and the corresponding lines you said to delete..they seemed to be random <td> and <table> tags?

And I don't know if it is something I did, don't think so, but now the whole site in Firefox looks messed up and the emails take incredibly long to get to my inbox.

Sign in to reply to this post

Eric Mittman

It looks like I accidentally posted the same version of the block file that you posted. I'm ensuring that the updated one is posted to this reply. Here is the code that should be removed from the specified lines:

43-46

php:
<?php
foreach( $_POST as $pkey => $pval ){
  if (!
RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {
?>



55-58

php:
<?php
  
}
}
?>



This is just an included email template file, making changes to this file will not have an effect on the look of the site or how long the emails take to send. It sounds like you may have adjusted the css if you are seeing things differently in the browser.

Attached Files
Block.zip
Sign in to reply to this post

elevy388997Beta Tester

Perfect! It works now, I deleted the first set of lines you mentioned, without thinking that when that happens, there will be a new set of code in the second set I was suppose to delete.

Sign in to reply to this post

Eric Mittman

I'm very glad to hear that. Let us know if you have any further questions.

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...