Forums / Templates, Stylesheets, Page Layout / Limit message length on "contact us" form

Limit message length on "contact us" form

Locked

Views: 1,387

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
29 Jun 2008, 7:13 AM
#1
carrie avatar

carrie

New Zenner

Join Date:
Jun 2008
Posts:
1
Plugin Contributions:
0

Limit message length on "contact us" form

Thanks to everyone on these forums - I have found many solutions while working on my new site. Unfortunately, I've now hit a problem that I can't find a solution for... I would appreciate any advice you can give!

I would like set a maximum number of characters that can be entered into the "message" textarea on the contact us form - using the zen cart counter.

I have found a couple of related posts, but still can't see the whole picture:
http://www.zen-cart.com/forum/showthread.php?t=50075
http://www.zen-cart.com/forum/showthread.php?t=93491

I have copied the javascript file "includes/modules/pages/product_info/jscript_textarea_counter.js" to "includes/modules/pages/contact_us/" (AFAIK these areas cannot be overridden by the template system).

However, I don't know how to apply this to the textarea on the form and display the "characters remaining" box.

I think I may have to edit the following lines in "includes/templates/CUSTOM_TEMPLATE/templates/tpl_contact_us_default.php":

<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>

Is it necessary to edit this file too? "/includes/modules/CUSTOM_TEMPLATE/attributes.php"

Thank for any help!