This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Edit custom field placeholder

#33569
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

Well, unfortunately there is no option for that, but you can try a custom code for that.

Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

add_action('wp_footer', 'wp_footer_change_filter_input_placeholder', 9999);
function wp_footer_change_filter_input_placeholder() {
	?>
	<script>
	(function(){
		let text = "My placeholder text";
		setTimeout(function() {
			document.querySelectorAll('fieldset.asp_custom_f input[type=text]').forEach(function(el){
				el.placeholder = text;
			})
		}, 100);
	}())
	</script>
	<?php
}

Change the text variable in the code for the input text you want.