Use jQuery to limit post title field in Gravity Forms


The post title input field lacks ability to set a max length by default. A simple work around is to use jQuery to limit the max length of the field.

1Inside of the Gravity Forms form builder post title field give it a custom css class, in our example we called it title_max_limit_60.

2Target the input inside the new class and set attribute maxlength…

jQuery(".title_max_limit_60 input").attr('maxlength','60');

Simple and works!

Leave a Reply