Skip to content

Instantly share code, notes, and snippets.

@wssrstrm
Created March 9, 2014 00:17
Show Gist options
  • Save wssrstrm/9441079 to your computer and use it in GitHub Desktop.
Save wssrstrm/9441079 to your computer and use it in GitHub Desktop.
Marshall Tuck Submit Form Style Fix
<script>
// Note, multiple things induce the rendering of a form so this will likely
// be called multiple times.
var myPostRender = function() {
$( "#edit-submitform" ).removeClass( "form-submit" ).addClass( "ngp btn btn-lg btn-success btn-block" );
$( "legend" ).css( "display" , "none" );
$( "#edit-postalcode" ).removeClass( "form-text" ).addClass( "form-control" );
$( "#edit-postalcode" ).parent().removeAttr( "class" ).addClass( "form-group" );
$( "#edit-emailaddress" ).removeClass( "form-text" ).addClass( "form-control" );
$( "#edit-emailaddress" ).parent().removeAttr( "class" ).addClass( "form-group" );
};
var nvtag_callbacks = nvtag_callbacks || {};
nvtag_callbacks.postRender = nvtag_callbacks.postRender || [];
nvtag_callbacks.postRender.push(myPostRender);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment