Add class to GF submit button

function form_submit_button($button,$form){
return '<input type="submit" class="btn" id="gform_submit_button_' . $form['id'] . '" value="' . $form['button']['text'] . '">';


You must be logged in to post a comment.

  1. Thanks

  2. Probably not a great idea to just completely overwrite the button HTML. Gravity Forms does alot of processing to add things for JS hooks, Events, Ajax etc.

    There is a plugin that adds classes to the submit button via a form on the backend. It parses the HTML in a filter to add new classes.

  3. Thanks for the code.

  4. Thanks for this!

    I think though that it's missing some security precautions, so I've adapted the same code here: