close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

tweeking contact form script for my server

Thread began 1/16/2011 9:22 am by j.dobres416289 | Last modified 1/17/2011 4:12 pm by Jason Byrnes | 2095 views | 6 replies |

j.dobres416289

tweeking contact form script for my server

Please help!

I have set up the contact form script on a site I am building and thought all was OK except that I have noticed I get the 'thank you' page acknowledging an email has been sent even if an email hasn't been sent!?(when all fields have been correctly filled in)
It only appears to work(send an email to me) if I enter my own email address in the email address field on the contact form,in which case it sends an email to me - not a lot of use for customer enquiries as they will obviously all have a different email address to me!?

The link is here
contactus.php

I have looked at the server (fasthosts) help page and it gives some help - however I am uncertain how to edit the contact form code based on the help!? - could you give please explain EXACTLY the changes I would have to make to the contactform script based on the guidance below?

Full info at
L3Nuby8xL3RpbWUvMTI5NTE4NTYxMS9zaWQvbDh6NFRja2s%3D


Extract from Fasthosts help

To prevent spam being sent through our webservers, there are certain conditions that must be met before our SMTP servers will send the email.
1.Email must be sent to, or from, an existing email address hosted by Fasthosts. This must be a mailbox on the same domain name on which the form to mail script is being hosted.
2.To stop misuse of your form by third parties the sendmail_from variable should be set to your Fasthosts hosted email address. While access to the php.ini file is restricted on our shared environment, you can sent this variable using the ini_set() command, shown below.
3.A fifth parameter, -f, should be added to the sendmail function. This will set the name of the from email address.
In its basic form, a simple sendmail script will look like this:
<?php
ini_set("sendmail_from", "user@yourdomain.com");
mail($email_to, $email_subject, $email_message, $headers, "-fuser@yourdomain.com");
?>
Provided that your form to mail script meets the requirements above, you should have no problems.

Sign in to reply to this post

Jason ByrnesWebAssist

with this info, all you should need to do is add the ini set line at line 1 of the contact us page:

php:
<?php

ini_set
("sendmail_from""user@yourdomain.com");
?>



then edit the WA_UniversalEmail/mail_php.php file.

change line 257:

php:
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader);




to:

php:
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader, "-fuser@yourdomain.com");




in both of these code examples, make sure to change user@yourdomain.com to a valid email account on your fasthosts domain.

Sign in to reply to this post

j.dobres416289

Thanks

Contact form is working fine now thanks!

1) How would I tweek the 1 off contact form pack to make a more complex form with radio buttons ,drop downs etc etc (I understand I would need to buy a solution for each domain?)

2) Web assist uses 'reCaptcha for it's forums - this seems to give a clear message re 'best practice' - do you have a product that has reCaptcha or could you please explain EXACTLY how I might tweek the contact form to work with reCaptcha (presumably it would include removing the Captcha code first?)
If this can't be done doesnt it mean that the WA contact solution doesnt meet WC3 web standards or maybe security features don't score re WC3?
anyway thanks again for your help an please enlighten re above 2 points

Jonathan

Sign in to reply to this post

Jason ByrnesWebAssist

1) This depends on how complex you wish to get. If you just want to add the new form fields, it is the same as adding form fields to any form, go to Insert -> Form and select the type of element you wish to add. If you wish to validation those fields, you will need to use the Form Toolkit Extension to add the validation.

2) No, the contact form solution pack does not support recaptcha.

Sign in to reply to this post

j.dobres416289

do you mean in dreamweaver

I am supposing you mean insert/form in dreamweaver - if I do this can't I just use spry validation within DW for the new form fields?
Re how complex I just mean a few radio button type questions and possible a few drop down or list questions?
...and what is the 'form toolkit extension you mention?

Jonathan

Sign in to reply to this post

j.dobres416289

how do I remove the captcha feature?

If I want to remove the Captcha feature from the pre built contact form to make my form more accessible to blind users EXACTLY how would I do this?

by the way I have just read some WC3 guidance on this issue
#security

Most intersting bit seems to be in the conclusion?

4. Conclusion
Sites with attractive resources and millions of users will always have a need for access control systems that limit widespread abuse. At that level, it is reasonable to employ many concurrent approaches, including audio and visual CAPTCHA, to do so. However, it must be noted that human users will fall through the cracks in these systems, and it will be necessary for sites like these to ensure that users with disabilities will have some human-operated means of interacting with a given resource in a reasonable amount of time.

The widespread use of CAPTCHA in low-volume, low-resource sites, on the other hand, is unnecessarily damaging to the experience of users with disabilities. An explicitly inaccessible access control mechanism should not be promoted as a solution, especially when other systems exist that are not only more accessible, but may be more effective, as well. It is strongly recommended that smaller sites adopt spam filtering and/or heuristic checks in place of CAPTCHA.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, Insert -> Form in dreamweaver.

Yes, you could use spry validation.


see details on form toolkit here:
?lid=webforms

See the "How to remove security features from your Contact Form" tutorial in the how to section of the contact Form Solution pack support page:
contact-form/

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