Created
July 25, 2013 19:26
-
-
Save jeffreynolte/6082938 to your computer and use it in GitHub Desktop.
Add placeholders to all list elements in Gravity Forms.
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
$('.gfield_list_cell').each(function(){ | |
var $this = $(this), | |
$tr = $('tr', $this.parent().parent().prev()), | |
i = $this.index(); | |
$('input', $this).attr('placeholder', $('th:eq('+i+')', $tr).text()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The data-label attribute of gfield_list_cell can be used to remove the additional text in the aria-label attribute.
This works fine for me.