Is it possible to add just text to a form -- not a form field, but just HTML text?
Is it possible to add just text to a form -- not a form field, but just HTML text?
While the answer to this question still appears to be no, I did find a work around. The Description field for a form field allows HTML, which you can use CSS to style and move around as needed.
Currently the work around would be to use a section break, populate the description and leave the label blank. Then you can use CSS to manipulate the styling as needed.
We are adding a free form HTML text element that can be added to a form and positioned like a field in the 1.4 release of Gravity Forms. This will enable you to place a block of text, an image, or any HTML wherever you want in your form.
Hey Carl - any eta on 1.4? I am launching a new site shortly and would love to know if I should wait for the new 1.4 goodies.
It's still going to be a little while for the 1.4 release, there's a lot going into that one.
In the interim, as an alternate to putting HTML in the description fields, you could insert blocks of HTML content into the form with a little jQuery. For example. I created an "extracontent" div with some markup and placed it in the page template just above the closing body tag.
Then I added a little jQuery snippet to the page header to reposition the div just above the label for the comments (field id #field_1_3)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#extracontent').insertBefore($('li#field_1_3 .gfield_label'));
});
</script>
Note: if your theme already loads the jQuery library, you can leave the first script reference out of your implementation.
That's pretty much it. You could create multiple content blocks and use the syntax above to place them wherever you want. You can change the "insertBefore" to "insertAfter" if you prefer to position something after a specific element.
Oh this is perfect! I can use this script to implement the multi-paged forms as well. Very nice. Very nice.
Awesome. If you do implement a multi-page form, please share with the rest of the class. We would love to see it.