PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

how to limit Title length for user post Title field?

  1. zhanliusc
    Member

    Now that I can't use the Limit Post Title to X Characters plugin ( see http://www.gravityhelp.com/forums/topic/unable-to-edit-forms#post-87101 ), is there a way within Gravity Forms to limit the title length (characters) in user post forms? Specifically the "Title field"?
    thanks

    Posted 11 years ago on Saturday November 3, 2012 | Permalink
  2. There is no way in the form builder to limit the length of the title, but you could perform validation on the length of the title, then return an error to the user if the title they entered is too long. You would use the gform_validation filter: http://www.gravityhelp.com/documentation/page/Gform_validation

    You could also just silently truncate the length of the title using the gform_pre_submission_filter: http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    Read the value that was submitted and trim it to the length you desire.

    Posted 11 years ago on Tuesday November 13, 2012 | Permalink