I was building a landing page in Elementor a few weeks ago, and the client wanted one thing that shouldn’t have been complicated: a review field on the contact form. Star rating, or at least a way for visitors to leave feedback alongside their message.
Elementor’s Form widget doesn’t have it. Name, email, message, dropdown, checkbox — all there. Nothing for a rating.
So I had two options. Install a plugin that adds the field, or write the code myself. The plugin route meant extra widgets I didn’t need, a few more KB on every page load, and in some cases a monthly fee. The code route meant I’d need to actually understand how Elementor registers form fields, which I hadn’t done before.
I picked the second one, and used AI to get there faster than I expected. Here’s exactly how it went, prompt and code included.
Can you add a rating field to an Elementor form without a plugin? Yes. Elementor Pro’s Form widget lets developers register custom field types through the elementor_pro/forms/fields/register hook. You write a small PHP class extending Elementor’s Field_Base, register it, and it shows up as a normal field type in the form editor — no third-party rating plugin required.
Plugin vs. Custom Code: The Two Ways to Fix a Missing Elementor Field
Elementor’s form field list has been the same for years, and rating fields never made the cut — there’s actually a five-year-old open feature request on GitHub asking for exactly this. So if you need one, you’re choosing between two paths.
Install a Plugin
Tools like Cool FormKit add a rating field type in a few clicks. No code, works immediately.
- Fast to set up
- Adds a full plugin’s worth of code, even if you only need one field
- Extra widgets you’ll never touch
- Often a paid upgrade for the feature you actually want
Write the Field Yourself
Register a single custom field type using Elementor’s own developer hooks.
- Only the code your site actually needs
- Free, and stays free
- Nothing extra loading on every page
- Requires understanding Elementor’s field registration API
Why I Skipped the Plugin (Elementor Plugin Bloat Is a Real Speed Problem)
I’ve seen this pattern too many times: a client’s site needs one small feature, so we install a plugin, and the plugin brings its own CSS file, its own JS bundle, sometimes its own database tables, and a settings page nobody will ever open again. Multiply that by every “quick fix” plugin installed over a year, and you’ve got a site that takes twice as long to load as it should.
For a rating field specifically, that trade felt lopsided. I wasn’t asking for much — a way to click 1 through 5 stars and have that number land in the form submission. A dedicated plugin gives you that, plus icon libraries, plus animation settings, plus a handful of other rating styles I’d never use.
There’s also the cost angle. Some of the plugins that add this field are free with limits, others are paid add-ons. For a single small business client’s site, paying a recurring fee for one form field is hard to justify when the alternative is a few dozen lines of code that, once written, never need touching again. It’s the same math we walk through with clients asking how much a small business website actually costs — every added plugin is a recurring line item, not a one-time expense.
How I Prompted AI to Write the Elementor Field Class
I’m not a WordPress developer by training. I know enough PHP to read it and adjust it, but I wouldn’t have written this from scratch with confidence. This is where AI-assisted development actually earned its keep — not by guessing at what Elementor wants, but by working from the real documentation.
The difference between a vague prompt and a working answer came down to what I fed it. Instead of asking something generic, I pulled Elementor’s actual developer reference for form fields and gave the AI the real spec, along with what I needed:
The Registration Code It Returned
Here’s the core hook that registers the field with Elementor’s form builder — the field class itself extends this with the star markup and value handling:
<?php
/**
* Registers a Star Rating field type in Elementor Pro Forms.
*/
function efrf_register_rating_field( $form_fields_registrar ) {
require_once __DIR__ . '/form-fields/rating-field.php';
$form_fields_registrar->register( new \Elementor_Form_Rating_Field() );
}
add_action( 'elementor_pro/forms/fields/register', 'efrf_register_rating_field' );
This part alone doesn’t do much — the real work happens inside rating-field.php, where the field class defines the star markup, the JS that swaps colors as you hover or click (red for 1 star, orange, yellow, and green by 4–5 stars — the Trustpilot-style scale I’d asked for), and how the selected value gets saved. I kept that file separate so the registration stays clean and easy to read.
Testing and Deploying the Field
- Built the field as a small site-specific plugin. Not the theme’s functions.php, so it survives a theme change.
- Tested on a staging copy of the site first. Confirmed the field showed up as “Rating” in the Elementor form editor’s field type dropdown.
- Fixed the small stuff. The first version submitted the rating as plain text; I asked for it to be saved as a number instead, so it would sort properly in exports. One follow-up prompt, one line changed.
- Sent a real test submission on the live form. Checked it arrived correctly in both the WordPress entries table and the email notification.
Total time, start to finish: under two hours, most of which was testing rather than writing code. No plugin installed, nothing new in the site’s plugin list to maintain.
Who This Approach Actually Makes Sense For
I wouldn’t tell every Elementor user to go write custom PHP. This route makes sense if a few things are true:
- You’re comfortable adding a small code snippet through a site-specific plugin (or have someone who can)
- The feature you need is narrow — one field, one behavior, not a whole new form system
- Site speed or plugin count is already a concern on the site
- You have access to an AI tool and are willing to give it real documentation instead of a one-line prompt
If your form needs are more complex — multi-step logic, payment fields, dozens of conditional rules — a well-built plugin is usually the better trade. You’re not saving much by hand-rolling something that substantial, and the maintenance burden shifts onto you.
This kind of judgment call — plugin versus custom code, feature versus page speed — is exactly what goes into every site we build. If you’re starting from scratch, our website design services are built with that same lean-first approach from day one.
Frequently Asked Questions
No. Elementor’s Form widget ships with fields like text, email, dropdown, and checkboxes, but not a star or numeric rating field. A separate Star Rating / Rating widget exists for displaying static ratings on a page, but it doesn’t work inside the Form widget.
Yes, as long as it’s added correctly. Use a site-specific plugin rather than editing your theme’s functions.php directly, so the code survives theme updates. Test on a staging site first, and keep a backup before adding anything new to a live site.
You need enough comfort with WordPress to add a small plugin file and enough PHP literacy to read what an AI tool generates and check it makes sense. You don’t need to write the code from memory, but you do need to understand roughly what it’s doing before putting it on a live site.
A single custom field adds a small PHP class and a few lines of CSS/JS — a fraction of what a full-featured form plugin loads. That’s the main appeal of this approach over installing a plugin for one field.
You don’t have to. If you’d rather have this built for your site without installing another plugin, get in touch below and we’ll take care of it.
Need This Field on Your Own Site?
If you’d rather skip the plugin route entirely, we can build and install a custom form field for you — no extra plugin, no bloat.
Email Us to Get Started