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.

Two lines and styles of Submit button text

  1. Hi,
    Is it possible to have two separate lines of text on the submit button?
    If so, is it possible to have separate CSS classes for each line?
    The use case is something like this:
    (Bigger text)Contact Us
    (Smaller text)to learn more
    Thanks,
    Josh

    Posted 6 years ago on Tuesday June 11, 2013 | Permalink
  2. Richard Vav
    Administrator

    Hi Josh,

    It is possible, you would use the gform_submit_button filter like this for example

    add_filter("gform_submit_button", "form_submit_button", 10, 2);
    function form_submit_button($button, $form){
        return "<button class='button' id='gform_submit_button_{$form["id"]}'><span class='bigger_text'>Contact Us</span><br><span class='smaller_text'>to learn more</span></button>";
    }

    you would add this to your theme's functions.php file between the opening and closing php tags.

    Regards,
    Richard

    Posted 6 years ago on Wednesday June 12, 2013 | Permalink
  3. Perfect! Thanks for your quick and thorough reply!

    Posted 6 years ago on Wednesday June 12, 2013 | Permalink
  4. Richard Vav
    Administrator

    You're welcome.

    Posted 6 years ago on Wednesday June 12, 2013 | Permalink

This topic has been resolved and has been closed to new replies.