PageSourceSearch

https://mymodernmet.com/wp/wp-content/plugins/gravity-forms-placeh…/gfplaceholderaddon.js?ver=1.0

js mymodernmet.com collected 2026-09-24 07:29:12 UTC 1,855 bytes, 71 lines download raw bytes

1(function($){
2
3var gf_placeholder = function() {
4
5	$('.gform_wrapper .gf-add-placeholder')
6		.find('input, textarea').filter(function(i){
7			var $field = $(this);
8			
9			if (this.nodeName == 'INPUT') {
10				var type = this.type;
11				return !(type == 'hidden' || type == 'file' || type == 'radio' || type == 'checkbox');
12			}
13
14			return true;
15		})
16		.each(function(){
17			var $field = $(this);
18
19			var id = this.id;
20			var $labels = $('label[for=' + id + ']').hide();
21			var label = $labels.last().text();
22
23			if (label.length > 0 && label[ label.length-1 ] == '*') {
24				label = label.substring(0, label.length-1) + ' *';
25			}
26
27			$field[0].setAttribute('placeholder', label);
28		});
29
30	var support = (!('placeholder' in document.createElement('input'))); 
31	if ( support && jquery_placeholder_url )
32		$.ajax({
33			cache: true,
34			dataType: 'script',
35			url: jquery_placeholder_url,
36			success: function() {
37				$('input[placeholder], textarea[placeholder]').placeholder({
38					blankSubmit: true
39				});
40			},
41			type: 'get'
42		});
43
44    $('.gform_wrapper .gf-add-placeholder').find('select').filter(function(i){
45        var $theSelect = $(this);
46
47       $theSelect.each(function(){
48           var elementID = this.id;
49           var inIdFormat = "#" + elementID;
50           var theLabel = $('label[for=' + elementID + ']').text();
51           console.log('The id for this field is '+ elementID + ' the label for this field is ' + theLabel);
52           $(inIdFormat).prepend("<option class='placeholder' selected disabled value=" + "'" + theLabel + "'" + ">" + theLabel + "</option>" );
53            $('label[for=' + elementID + ']').hide();
54
55       })
56    });
57
58
59
60
61
62
63
64};
65
66$(document).ready(function(){
67	gf_placeholder();
68	$(document).bind('gform_post_render', gf_placeholder);
69});
70
71})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.