Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop hidden fields from printing in email.

Status
Not open for further replies.
Formmail is designed to take a submitted form and send you the contents. If you have a hidden field in the form, it has no way of knowing that it is hidden -- at the point in time when Formmail.pl gets the form content there is no distinction between visible and hidden.

You could look at modifying the Formmail code (although many isps just provide an "as is" solution so this is often not possible).

Unless the implimentation of Formmail you have allows you to control which fields are emailed (and which are not), you will have to look at solutions like:

- Use javascript to copy the data you DO want into a second (hidden) form and submit that only to the formmail.pl.

Just a starter for 10.
Jeff
 
DO NOT USE MATTS SCRIPTS FORMMAIL! it is a major security risk, it is a major method spammers use to hijack your mail server to send bulk email. It is a wretched application. To boot, most web hosts are now making it an offense to have this app installed on your site.

Instead, use this version of formmail that has been reworked by Source Forge:

It is still a perl or cgi script, and if you are familiar with matts Formmail, you will easily be able to use this. It is secure, and approved for use by most web hosts.


When in doubt, deny all terms and defnitions.
 
Oh.

OK... (*slowly moves toward the door*)... sshhuuuure... what ever you say.

Jeff
 
I got it worked out. Seems that the sort order was showing the hidden fields that is why they were printing in the email. You can keep hidden fields from displaying by adding a hidden input sortorder: and eliminate the fields you do not want to print.

The formmail thing is not my idea, the hosting company my day job uses has it for all of there clients as a default pl script. They have reworked the bugs that you speak of so that is not a problem. Matts formmail is not the devil as most seem to think as long as you go in and fix the bugs.

---------------------------------------------
 
Even Matt claims his formmail script is not secure... however, as you say, if someone knowledgeable reworked the script,then you should be okay. However, there still are version of it floating around that allow spammers to hijack your webserver, so just posting for the benefit of others that don't know.

When in doubt, deny all terms and defnitions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top