Add text block to a Gravity Form visible when sent as email

You may want to show arbitrary text on a Gravity Form that is not shown on the website but is sent on the email along with the other fields.

In the Gravity Form add a paragraph field and add in your text in the advanced tab in the default value field – also give it a custom CSS class disable – this will be used to target the field in the jQuery below.

Make the field read-only…

jQuery(document).ready(function($){
		
	$(".gform_wrapper .disable textarea").attr('disabled','disabled'); // Change textarea to other input type if required


});

If you do wish to show it in the front end make it read-only or disabled by adding the attribute disabled as per the jQuery above. The above jQuery targets the textarea,  change this if needed to another input type.

Then in CSS, if required hide on the front end

.gform_body li.disable {
	display: none;
}

That’s it – the static text will be visible on the GF email that is sent to the recipient.

Leave all Comment