Limiting Word Count in a Text Area with Gravity Forms

September 7th, 2010 | 1 Comment | Posted in Gravity Forms, Hacks & Mods, Wordpress

Add an HTML field to your form.

Insert the following code:

<script src=”http://www.yoursite.com/wp-content/themes/your-theme/scripts/jquery.counter.js” type=”text/javascript”></script>
<script type=”text/javascript”>// <![CDATA[
jQuery(document).ready(function($q){
$q("#input_15_12").counter({type:'word', goal:'100'});
});
// ]]></script>

Use view source when you’re looking at the form in a page to see what the id of the text area field you want to validate is and use that in the above code where the red text is.

Upload the jquery.counter script to your server to whatever location you specified in the code above.

All set!

Follow Discussion

One Response to “Limiting Word Count in a Text Area with Gravity Forms”

  1. samuel ramos Says:

    This is very cool. What an awesome feature.

Leave a Reply