bookmark_borderAdding Images, JavaScript, And More To Forms

If you need to insert an image or other HTML content within your form, Gravity Forms makes the process easy and painless with the HTML field. Here’s how to do it.

  1. First, add an HTML field to your form where you want the custom content to go.
  2. Next, click on the HTML field that you just added to open up the field’s settings.
  3. Within the Content setting on the field, enter in any HTML content that you want to display.
  4. Save the form and access the form. You should now see your HTML content displaying correctly.

For example, if you want to embed an image within the form, you would enter the following:

<img src="https://example.com/forder_name/my_image.jpg">

If you wanted to embed JavaScript into the form, you would do so like this:

<script>
function myCustomJs() {
    return true;
}

function myCustomJs();
</script>