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.

Add filter to Form Title and Description


    Good day,

    May I suggest this code to add filters to the title and description on forms. It does not change default behavior at all while adding the possibility to extent title and description.
    This is in form_display.php in line ~455 of 1.6.9

    if($display_title || $display_description){
                    $form_string .= "
                            <div class='gform_heading'>";
                        $form_string .= apply_filters('gform_display_title', "
                                <h3 class='gform_title'>" . $form['title'] . "</h3>",$form);
                        $form_string .= apply_filters('gform_display_description',"
                                <span class='gform_description'>" . rgar($form,'description') ."</span>",$form);
                    $form_string .= "

    What this allows us to do is to filter the title and add some html wrapper divs around it to make responsive ribbons and the like with the title.

    Thank you for your consideration.

    Posted 11 years ago on Monday November 5, 2012 | Permalink
  2. I'll move this to feature requests. Thank you for the code.

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