Skip to content

Commit

Permalink
Gravity Forms: fix submit button with conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Jul 26, 2017
1 parent bf14661 commit 084e3e6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions inc/plugins/gravityforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@ function stormbringer_gform_field_css_class($classes, $field, $form)

function stormbringer_gform_submit_button($button, $form)
{
return '
<div class="form-actions">
<button class="btn btn-primary" id="gform_submit_button_'.$form["id"].'">
<span>' . $form["button"]["text"] . '</span>
</button>
</div>
';
//$button = str_replace('<input type=\'submit\' ','<button ', $button);
$button = str_replace('gform_button','gform_button btn btn-primary btn-lg', $button);
//$button = str_replace('/>', '>', $button);
$button = '<div class="form-actions">'.$button.'</div>';
return $button;
}
add_filter('gform_submit_button', 'stormbringer_gform_submit_button', 10, 2);

Expand Down

0 comments on commit 084e3e6

Please sign in to comment.