If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Customization from the Admin / Please Help! How to stop spam on the Contact Us form?

Please Help! How to stop spam on the Contact Us form?

Started by lara2911 on 25 Dec 2018, 11:05 AM · Views: 3,073

Results 1 to 7 of 7
25 Dec 2018, 11:05 AM
#1
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Post #1 by lara2911

Hi, I'm presently using: v1.5.5e
Getting lots of spam emails through the Contact Us form recently. Could anyone tell me please how to remove the Contact Us form? I still would like to keep the page so that our email address will be visible but the Contact Form must go! Please help :blush: Cheers!

[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

25 Dec 2018, 3:11 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Dec 2018, 10:41 PM
#3
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Post #3 by lara2911

To be honest I would prefer to just remove the contact us box at all. Is there any way to do that please? Thx

26 Dec 2018, 4:51 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

You'll have to remove the form in the tpl_contact_us_default.php template file. If that file isn't already in your custom template directory, copy it from template_default and make your modifications to the copy.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Dec 2018, 9:46 AM
#5
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Post #5 by lara2911

DrByte:

You'll have to remove the form in the tpl_contact_us_default.php template file. If that file isn't already in your custom template directory, copy it from template_default and make your modifications to the copy.
Thank you so much for your help. I have found this file but this is all like Chinese to me :shocking::wacko: Could you please please tell me what to remove in there?
Thank you very much. Here is what the whole file includes:

<?php /** * Page Template * * Loaded automatically by index.php?main_page=contact_us.<br /> * Displays contact us page form. * * @package templateSystem * @copyright Copyright 2003-2013 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version GIT: $Id: Author: DrByte Sun Feb 17 23:22:33 2013 -0500 Modified in v1.5.2 $ * Updated Contact Us Subject for v1.5.1 by Judy Gunderson (stellarweb) 2013-08-16 * Modified by Anne (Picaflor-Azul.com) Westminster New v1.3 * Modified by frank18 (isonetwork.net.au) 20150504 */ ?> <div class="centerColumn" id="contactUsDefault"> <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send', 'SSL')); ?> <?php if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?> <div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div> <div class="buttonRow success-back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <?php } else { ?> <h1><?php echo HEADING_TITLE; ?></h1> <?php if (DEFINE_CONTACT_US_STATUS >= '1' and DEFINE_CONTACT_US_STATUS <= '2') { ?> <div id="contactUsNoticeContent" class="content"> <?php /** * require html_define for the contact_us page */ require($define_page); ?> </div> <?php } ?> <?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?> <?php if (DEFINE_CONTACT_US_STATUS == '0') { ?> <address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address> <?php } ?> <fieldset id="contactUsForm"> <div class="contact-left"> <?php // show dropdown if set if (CONTACT_US_LIST !=''){ ?>

<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>

<?php echo zen_draw_pull_down_menu('send_to', $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <?php } ?>

<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>

<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" />

<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>

<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" />

<label class="inputLabel" for="subject"><?php echo ENTRY_EMAIL_SUBJECT; ?></label>

<?php echo zen_draw_input_field('subject', $subject, ' size="40" id="subject"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <div class="alert"><?php echo FORM_REQUIRED_INFORMATION; ?></div> </div> <div class="contact-right"> <label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label> <?php echo zen_draw_textarea_field('enquiry', '30', '7', $enquiry, 'id="enquiry"'); ?> <?php echo zen_draw_input_field('should_be_empty', '', ' size="40" id="CUAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?> </div> </fieldset> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div> <?php } ?> </form> </div>
26 Dec 2018, 9:50 AM
#6
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Post #6 by lara2911

DrByte:

You'll have to remove the form in the tpl_contact_us_default.php template file. If that file isn't already in your custom template directory, copy it from template_default and make your modifications to the copy.

Thank you so much for your help. I have found this file but this is all like Chinese to me :( Could you please please tell me what to remove in there?
Thank you very much. Here is what the whole file includes:

<?php /** * Page Template * * Loaded automatically by index.php?main_page=contact_us.<br /> * Displays contact us page form. * * @package templateSystem * @copyright Copyright 2003-2013 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version GIT: $Id: Author: DrByte Sun Feb 17 23:22:33 2013 -0500 Modified in v1.5.2 $ * Updated Contact Us Subject for v1.5.1 by Judy Gunderson (stellarweb) 2013-08-16 * Modified by Anne (Picaflor-Azul.com) Westminster New v1.3 * Modified by frank18 (isonetwork.net.au) 20150504 */ ?> <div class="centerColumn" id="contactUsDefault"> <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send', 'SSL')); ?> <?php if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?> <div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div> <div class="buttonRow success-back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <?php } else { ?> <h1><?php echo HEADING_TITLE; ?></h1> <?php if (DEFINE_CONTACT_US_STATUS >= '1' and DEFINE_CONTACT_US_STATUS <= '2') { ?> <div id="contactUsNoticeContent" class="content"> <?php /** * require html_define for the contact_us page */ require($define_page); ?> </div> <?php } ?> <?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?> <?php if (DEFINE_CONTACT_US_STATUS == '0') { ?> <address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address> <?php } ?> <fieldset id="contactUsForm"> <div class="contact-left"> <?php // show dropdown if set if (CONTACT_US_LIST !=''){ ?>

<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>

<?php echo zen_draw_pull_down_menu('send_to', $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <?php } ?>

<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>

<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" />

<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>

<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" />

<label class="inputLabel" for="subject"><?php echo ENTRY_EMAIL_SUBJECT; ?></label>

<?php echo zen_draw_input_field('subject', $subject, ' size="40" id="subject"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <div class="alert"><?php echo FORM_REQUIRED_INFORMATION; ?></div> </div> <div class="contact-right"> <label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label> <?php echo zen_draw_textarea_field('enquiry', '30', '7', $enquiry, 'id="enquiry"'); ?> <?php echo zen_draw_input_field('should_be_empty', '', ' size="40" id="CUAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?> </div> </fieldset> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div> <?php } ?> </form> </div>
26 Dec 2018, 2:24 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #7 by drbyte

Here's what the entire file contents should be if you're removing the "submission form" but leaving the address contact details, for v1.5.5:

<?php
?>
<div class="centerColumn" id="contactUsDefault">


<?php if (CONTACT_US_STORE_NAME_ADDRESS== '1') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>


<?php if (DEFINE_CONTACT_US_STATUS >= '1' and DEFINE_CONTACT_US_STATUS <= '2') { ?>
<div id="contactUsNoticeContent" class="content">
<?php
/**
 * require html_define for the contact_us page
 */
  require($define_page);
?>
</div>
<?php } ?>


</div>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.