Plugin how-tos · Guide
How to Find Form ID in MailPoet (Step by Step)

Short answer
Go to MailPoet > Forms and open the form for editing. The number after id= in your browser's address bar is the form ID. You can also open the form placement options in the editor, where MailPoet shows a shortcode that includes the same ID, ready to copy.
Key takeaways
- The MailPoet form ID appears after id= in the form edit URL.
- The form editor shows a shortcode and PHP snippet with the ID.
- The MailPoet block lets you pick forms by name without an ID.
- Duplicated forms get new IDs, so update old shortcodes.
- Copy shortcodes rather than typing them to avoid quote errors.
How do you find a form ID in MailPoet?
Go to MailPoet > Forms, open the form for editing and look at the browser address bar, where the number after id= is the form ID.
That is the fastest method. For example, if the address ends with id=3, your form ID is 3.
You can also find the ID inside the form editor, where MailPoet shows a ready-made shortcode such as [mailpoet_form id=“3”] for placing the form anywhere on your site.
This guide covers both methods, plus when you actually need the ID, how to use it in shortcodes and PHP, and what to do if the ID does not work. If you are just getting started with the plugin, our guide on how to use MailPoet in WordPress covers setup first.
Why would you need a MailPoet form ID?
You need the form ID when placing a form with a shortcode, in PHP template code, in a page builder widget or when telling support which form has a problem.
In the block editor you often do not need it. The MailPoet subscription form block lets you choose a form by name from a list.
The ID becomes important when:
- Your page builder or theme area only accepts shortcodes.
- A developer is adding the form to a theme template with PHP.
- You are styling one specific form with custom CSS.
- You are troubleshooting and need to tell forms apart.
- A form was deleted and recreated, so the old shortcode points to the wrong ID.
How do you find the form ID from the address bar?
Open MailPoet > Forms, click the form name or Edit, and read the id value at the end of the URL in your browser's address bar.
Step by step:
- In your dashboard, go to MailPoet > Forms.
- Find the form you want in the list.
- Click its name or the Edit link.
- Look at the address bar. The URL includes a part like id=2.
- The number after id= is your form ID.
On many browsers you can also hover over the Edit link in the forms list and read the URL in the status bar at the bottom of the window, without opening the form.
This works because WordPress admin pages pass the item being edited as a query parameter in the URL. MDN's page on URL query strings explains how these parameters work if you are curious.
How do you find the form ID inside the form editor?
Open the form in the editor and check the form placement options, where MailPoet shows the shortcode and PHP code that include the form ID.
In the MailPoet form editor, the settings sidebar includes Form placement options. Alongside popup, slide-in and fixed bar options, there is an option for other placements, such as widgets, shortcodes and PHP. The exact label can vary by version.
Open it and you will see code similar to:
- A shortcode like [mailpoet_form id=“2”]
- A PHP line that runs that shortcode inside a theme file
- In some versions, an iframe embed option
The number inside id=“...” is the same form ID you saw in the address bar. MailPoet's knowledge base article on types of forms describes the placement options in more detail.
Which method should you use?
Use the address bar for a quick lookup, and the form editor when you also need a copy-ready shortcode or PHP snippet.
| Method | Where to look | Gives you | Best for |
|---|---|---|---|
| Address bar | URL while editing the form | The ID number | Quick checks and support tickets |
| Hover in forms list | Browser status bar | The ID number | Checking several forms fast |
| Form editor placement | Other placements section | Shortcode and PHP with the ID | Adding the form to pages or templates |
| Block editor | MailPoet form block | Form picked by name | Posts and pages without codes |
Both methods show the same ID, so pick whichever is quicker for you.
Form IDs are simple whole numbers that MailPoet assigns in order as you create forms. Your first form is often 1, but deleted forms leave gaps, so do not assume the numbers run neatly from 1 upwards.
If you manage several sites, note each form's ID next to its name in your own records. It saves a trip into the dashboard the next time a developer or support agent asks which form is affected.
How do you use the form ID in a shortcode?
Copy the MailPoet shortcode with your form ID into a Shortcode block, a text widget or a page builder's shortcode element, then save and preview the page.
For example, to place form 2 on a page:
- Edit the page.
- Add a Shortcode block, or your builder's shortcode widget.
- Paste [mailpoet_form id=“2”].
- Update the page and view it.
Shortcodes are a standard WordPress feature. The WordPress.org guide to the Shortcode block explains how to add one in the block editor.
Widget areas in classic themes work the same way. Add a Shortcode or Text widget under Appearance > Widgets and paste the code there to show the form in a sidebar or footer.
If you use Elementor or another builder, look for a Shortcode widget rather than pasting the code into a text widget, which may show it as plain text. Our guide on how to use Elementor in WordPress shows where its widgets live.
How do you use the form ID in PHP?
Developers can print a MailPoet form in a theme template by passing the shortcode with the form ID to WordPress's do_shortcode function.
A typical line in a child theme template looks like this:
<?php echo do_shortcode( '[mailpoet_form id="2"]' ); ?>
The do_shortcode reference on WordPress Developer Resources explains how the function works.
Put template changes in a child theme so theme updates do not overwrite them. If you are unsure about adding PHP to a live site, read how to use AI to fix WordPress errors for recovering from a broken template. If the form does not appear, check that MailPoet is active and the ID matches an existing, published form.
What if the form ID does not work?
If a shortcode shows nothing or an invalid form ID message, the form was probably deleted, moved to trash, duplicated with a new ID or typed incorrectly.
Checks to run:
- Confirm the form exists. Go to MailPoet > Forms and make sure it is not in the trash.
- Match the ID exactly. Copy the shortcode from the editor rather than typing it.
- Check the quotes. Some editors convert straight quotes to curly quotes, which breaks shortcodes.
- Clear caches. A cached page may still show an old version.
- Check for conflicts. Temporarily switch to a default theme or disable other plugins on a staging copy.
Duplicating a form creates a new form with a new ID. If you edited the copy but your page still uses the old shortcode, visitors see the old form.
Can you style a specific form using its ID?
Yes, MailPoet forms carry identifying classes and IDs in their HTML, so you can target one form with custom CSS based on its form ID.
The simplest route is MailPoet's own form styles and custom CSS option in the form editor, which applies only to that form.
For theme-level CSS, use your browser's inspect tool to find the form's wrapper class or ID on the page, then target it in Appearance > Customize > Additional CSS or your child theme stylesheet.
How do forms connect to lists and emails?
Each MailPoet form adds new subscribers to the lists you choose in its settings, so knowing the form ID helps you track which signup source feeds which list.
In the form editor, check the list setting to see where subscribers go. If you run several forms, such as a footer form and a popup, give each a clear name so you can tell them apart in the forms list.
For list-building ideas, see how to grow an email list with WordPress.
If confirmation emails are not arriving after signups, our guide to WordPress not sending emails covers the usual causes.
Quick recap
Find the MailPoet form ID in the edit URL or in the form editor's placement options, then use it in a shortcode or PHP line wherever you need the form.
For most posts and pages, the MailPoet block is simpler because you choose forms by name. Keep the ID handy for shortcodes, templates, styling and support requests.
Frequently asked questions
What does the MailPoet form shortcode look like?
It looks like [mailpoet_form id=“2”], with your own form number in place of 2. Copy the exact version from the form editor's placement options so the quotes and number are correct.
Does a MailPoet form ID change when I edit the form?
No. Editing a form keeps the same ID. A new ID is created only when you add a new form or duplicate an existing one, so shortcodes keep working after normal edits.
Why does my MailPoet shortcode show an error about the form ID?
Usually the form no longer exists, is in the trash or the ID in the shortcode is wrong. Check MailPoet > Forms, copy a fresh shortcode from the editor and replace the old one on your page.
Do I need the form ID to add a MailPoet form to a post?
Not in the block editor. Add the MailPoet subscription form block and choose your form from the list by name. The ID is mainly needed for shortcodes, page builders, PHP templates and troubleshooting.
Can I see form IDs for all MailPoet forms at once?
MailPoet's forms list shows names rather than IDs. Hover over each Edit link and read the URL in your browser's status bar to check several forms quickly without opening each one.
Sources
- MailPoet plugin WordPress.org Plugins
- Types of Forms MailPoet Knowledge Base
- Shortcode block WordPress.org Documentation
- do_shortcode() WordPress Developer Resources
- URL: search property MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


