Created
April 9, 2013 03:30
-
-
Save intelliweb/5342745 to your computer and use it in GitHub Desktop.
Gravity Forms: Move field descriptions above fields. Make sure to place this snippet AFTER where jQuery is enqueued (right before the </ head> tag is good). The description CSS may need to be tweaked to change margins, padding depending on theme and preferences. Source: http://www.gravityhelp.com/forums/topic/request-setting-to-place-field-descr…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function intw_gf_sublabels() { | |
if( is_page(39) ) { ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
jQuery('.ginput_complex label').each(function(i,e){ | |
sublabel = jQuery('<label>').append(jQuery(e).clone()).remove().html(); | |
jQuery(e).siblings().after(sublabel); | |
jQuery(e).remove(); | |
}); | |
}); | |
</script> | |
<?php } | |
} | |
add_action('wp_head', 'intw_gf_sublabels'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment