Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravityforms placeholders
(function($){
$.fn.setPlaceholder = function(){
return this.each(function(){
var label = $(this).parent().prev();
label.hide();
var label = $(this).parent().prev().text().replace('*','');
$(this).attr('placeholder',label);
});
};
})(jQuery);
jQuery(document).ready(function($){
$('.banner-form input[type=text],.banner-form textarea').setPlaceholder();
$(document).bind('gform_post_render', function(){
$('.banner-form input[type=text],.banner-form textarea').setPlaceholder();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment