Input placeholders

Placeholder on a single field

Adding placeholder text to an input field can be done with a bit of JavaScript. This will be an option in a future version of Quform, in the mean time, add an HTML element to the form (from the “More” tab), and enter this content:

1
2
34
5
<script>
    jQuery(document).ready(function ($) {
        $('.iphorm_1_1').attr('placeholder', 'Name');    });
</script>
<script>
	jQuery(document).ready(function ($) {
		$('.iphorm_1_1').attr('placeholder', 'Name');
	});
</script>

On line 3 change iphorm_1_1 to the unique ID of the field you want to set the placeholder on, and change Name to the placeholder text.

Placeholder on multiple fields

For multiple fields, simply duplicate line 3 of the above code on the line below it, then change the unique IDs and placeholder text to suit.

1
2
3
4
5
6
7
<script>
    jQuery(document).ready(function ($) {
        $('.iphorm_1_1').attr('placeholder', 'Name');
        $('.iphorm_1_2').attr('placeholder', 'Email');
        $('.iphorm_1_3').attr('placeholder', 'Message');
    });
</script>
<script>
	jQuery(document).ready(function ($) {
		$('.iphorm_1_1').attr('placeholder', 'Name');
		$('.iphorm_1_2').attr('placeholder', 'Email');
		$('.iphorm_1_3').attr('placeholder', 'Message');
	});
</script>

Still having trouble? Head over to the forums.

Forums