Hey gang,
I've re-positioned my form submit button using the following CSS:
.gform_image_button {
float: right;
position: absolute;
right: 3px;
bottom: 40px;
}
The button is right where I want it but, if the user submits the form with an error, the error messages will cause the button to overlap some form fields. (I'm using AJAX forms, btw.)
Below is the solution I came up with, which doesn't work. I've placed this script in my HEAD section. I'm hoping you folks can spot what I'm doing wrong...
<script type="text/javascript">
jQuery(document).ready(function($) {
// On form validation error, adjust the position of the submit button to prevent overlapping
$(document).bind("gform_post_render", function(){
tooltip_form_error();
});
function tooltip_form_error(){
if( $(".validation_error").length > 0 ) {
$(".gform_image_button").css("bottom","0px !important");
};
}
});
</script>