Sometimes you want sheik professional from your WordPress form. No nonsense, minimalist, cut, clean, and tidy. You’ll be able to pull that off effortlessly with your Ninja Forms as they inherit the styling of your theme with a chameleon’s grace. Other times though, you’re going to want to have fun with your WordPress forms! Make them hop up, jump out, grab a reader’s attention. Times like that are perfect for pictures, and we’ve had some questions recently from users about how to add an image to Ninja Forms. It’s easy. Follow along and let’s do this!
How to Add an Image to Ninja Forms
I’ll walk you through it by making a little demo of a newsletter signup. ‘Tis the season for all things pumpkin and such, so I’ve grabbed an image of a couple jack o’lanterns. I’ll assume you either already have a form in mind to add your image to, or have created one to experiment on. Pop that form open and let’s walk through this step by step.
Step 1: Add an HTML field
The HTML field is where images will live in Ninja Forms in version 3.0 and beyond. If you add an HTML field, do nothing to it, and preview the form you won’t even see it. The HTML field exists only for the purpose of displaying whatever you put into it.
Clicking on the HTML field opens its settings window. Here you have a rich text editor that you can add just about anything to- text, links, images, videos, merge tags, you name it.
Step 2: Add the Image in the HTML Field Settings Window
Adding an image is as simple as the click of a button. I’ve highlighted the one you’re looking for in the image below (2). Just click that little guy and the WordPress Media Library opens. Upload your image into the Media Library or choose one you already have there. It’s just like adding an image anywhere else in WordPress!
Here’s exactly what I’ve done to get the above:
- Added text and made it larger by applying an h2 tag to it.
- Added the image via the media button
- Centered both text and image via the alignment button
The second step there is all you actually need to do to get an image. Forget the rest of it unless you want text accompanying it!
Step 3: Preview Your Work!
For this example I’ve added an email and submit field to the form. This is what it looks like in the form builder:
And this is what it looks like on a page:
Step 4 (optional): Spice Up Your WordPress Form!
I’ve lined up the email and submit fields in this form by dragging and dropping them next to each other via our Layout and Styles extension. If you want your email and submit field to line up in a single row like we have here but don’t have Layout and Styles, check this article out and you can learn how to approximate it manually!
If your goal is to make your form as eye catching as possible, there’s a lot more styling options you can take advantage of with Layout and Styles. You can style background colors, borders, text, and more by field or for the form as a whole. As a quick example, I’ve styled the background color of our form below via Advanced>Styles>Row Styles>background color:
Now you know how to add an image to Ninja Forms to spice up any WordPress form! Get creative and go to town!
Arnaldo Alves says:
Hi! I’m using Ninja Forms on my site and it works perfect. In the html field to write an email, I inserted an image and placed a link, but when I test the image link does not work.
I can insert link in text, but not in an image.
Any suggestion?
Thank you!
Quay Morgan says:
Arnaldo,
Hey! Hit us up in our support channel and we can assist you a lot better with this!
Cheers,
Quay
Hasnain Mehmood says:
How to add font Awesome Icon in ninja form inputs…?
Quay Morgan says:
Hasnain,
I’m honestly not 100% positive, but we’ve been getting a good many people asking this. I’ve added it to my editorial schedule as a blog post. Check back with us soon 🙂
Cheers,
Quay
Elena says:
Hello.
I’m looking for a form to incorporate into my website. What I need is for visitors to be able to attach images (as many as they want) and videos. I would also like to receive that form as a pdf. Is that possible?
Kind regards,
Elena
Quay Morgan says:
Elena,
Hey! It sure is. The HTML field described in the article handles video as well, and there’s no limit to the number of them that you can have in a form (other than server resources, but that’s a hosting limitation).
To send the form as a PDF, check out our PDF Form Submissions extension: https://ninjaforms.com/extensions/pdf-form-submissions/
Cheers,
Quay
Bo says:
Thanks so much for this! I just switched from Contact Form 7 to Ninja Forms and wanted a little text above the input boxes.
This was just the thing I needed.
Thanks.
Pradeep says:
Hi I want to upload image in front end in Ninja form for each entry. How can I do it can you please guide me.
Quay Morgan says:
Hey! File Uploads is what you’re after: https://ninjaforms.com/extensions/file-uploads/
Cheers,
Quay