Created
September 14, 2016 21:28
-
-
Save davidsword/9459abb45d9fedec2ec20087746428cb to your computer and use it in GitHub Desktop.
This file contains 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
// turn gravity form labels into placeholder values | |
jQuery('form ul li').each(function(index) { | |
feildid = jQuery(this).attr('id'); | |
feildname = jQuery('#'+feildid+' label').text().replace('*','').replace(':',''); | |
jQuery('#'+feildid+' input, #'+feildid+' textarea').attr('placeholder',feildname); | |
jQuery('#'+feildid+' label').remove() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment