close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Remove part of the email body

Thread began 8/24/2010 11:24 am by madelectrical386948 | Last modified 8/27/2010 12:27 pm by Jason Byrnes | 3756 views | 13 replies |

madelectrical386948

Remove part of the email body

I am trying to understand how to remove some variables from the email that will be reported.

I want the information of the name,email and comments, but not the security answer or hidden fields. It is present on a received email.

It looks like the email body (float.php) can be changed around a bit to show what you want. I hope that is the case. I would like to remove those dynamic values from the pval array.

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

So do I remove one of these values here or remove it from the contact.php page.

thx

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

neear the top of the float.php page, you should see the following:
$remove = array();
$remove[] = "";
$remove[] = "x";
$remove[] = "y";



you can add any form element to this array to have it removed. For example if you have a form element named "myElement" and you want to add it to the array:
$remove = array();
$remove[] = "";
$remove[] = "x";
$remove[] = "y";
$remove[] = "myElement";

Sign in to reply to this post

madelectrical386948

Ok, that makes sense that I can us the float.php to remove elements.

I added one to that line which shows up on the email body that I wanted to remove and I picked the label "Contact_me_group_nbsp". That is on the email body. Is that not the element that I need to bypass?

I added the line in your example, and I received a parse error. Any ideas.

Mike

<div class="fullColumnGroup" style="clear:left;">
<label for="Contact_me_group_nbsp" class="sublabel" >Answer:<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="Contact_me_group_nbsp_Spry">
<input id="Contact_me_group_nbsp" name="Contact_me_group_nbsp" type="text" value="" class="formTextfield_Large" tabindex="5" onblur="hideServerError('Contact_me_group_nbsp_ServerError');"/>
<span class="textfieldRequiredMsg">Incorrect repsonse; please try again</span> </span>

Sign in to reply to this post

Jason ByrnesWebAssist

what was the parse error?

what is the case you added?

Sign in to reply to this post

madelectrical386948

Hi Jason,

This is the parse error

Parse error: syntax error, unexpected '}' in /home/content/c/r/a/cragdire/html/webassist/email/templates/Float.php on line 6

Line 6

$remove{} = "Contact_me_group_nbsp";

OK, I see the problem, used { rather then [.

**** rookie mistake :)

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

yes, use the square brackets.

Sign in to reply to this post

madelectrical386948

Hi Jason,

I need to make a few more changes and I got the fields that I only needed on the email.

I would like to change the ID's on the last 3 items that show up on the email.

Contact me group name:, I would just like name.
Contact me group email:, I would just like email.
Contact me group comments:, I would just like comments.

I modified the forms under the contact us page, but I wonder if I need to change the spry checks on the bottom.

The reason I ask, the emails are not received, but I don't have any error message. It seems to validate.

I will upload the txt file

Attached Files
contact.us page.txt
Sign in to reply to this post

madelectrical386948

Hi Jason,

You didn't reply on the last comments. I figured it out, but normally, I really like to ask before I do. Just to save time.

I just basically copied the form ID and renamed it to what I wanted using the standard copy and replace feature.

I have been cking out different web sites for different contact pages and I notice 3 big areas that are not covered by WA that I can see.

The Captcha is very difficult to see sometimes.
1. Are there better formats out there that make it easier to see? I guess different pics of that would help.
2. How do you make the info stay after you put a wrong reply to your Captcha. It's not a big deal with a very small form, but if you ask a client to put lots of time and info and it's wiped out with a wrong input, that is very bad. So how do you keep the info there?
3. I need to ask more to the form that WA offers. The normal contact is Name:, Email and comments. I would like to ask for 1st name, last,city,email and phone number under a contact header. Some drop downs and selections after that. Can I do that with the WA, or do I basically hard code it in?
If I hard code it in, will is goof up the validations in the beginning scripts?

Please let me know.

Mike
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>

Sign in to reply to this post

Jason ByrnesWebAssist

In the form builder wizard, you can edit the form design.

In the form design editor, select Form Elements from the first dropdown, then select Captcha from the second.


this page will allow you to configure the captcha settings.


Also in the form builder wizard, you can add form elements.



to alter the way the labels appear in the email, you could use a replace fiunction.


In the template the code to write the label looks like:

php:
<?php echo(str_replace("_"," ",$pkey)); ?>:</th>




you can use the replace function to remove part of the form name from the label.

say the elements name is "Appointment_request_group_First_Name", and you want to only show "First_Name for the label:

php:
<?php echo(str_replace("_"," ",str_replace("Appointment_request_group_"""$pkey))); ?>:</th>
Sign in to reply to this post

madelectrical386948

Pefect!

thanks Jason

Sign in to reply to this post
loading

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