WordPress plugin

MachForm Shortcode

MachForm is a capable forms app, and embedding its forms in WordPress content is more awkward than it should be. Most people give up and link to the form instead. We wrote a plugin so you don't have to — now with a block for the block editor as well as the original shortcode.

What it does

It embeds a MachForm form into any WordPress post, page, or widget area — either with a block in the block editor or with the original [machform] shortcode. Both go through the same renderer, so they produce identical markup and you can mix them freely. Configuration is a single field: the URL of your MachForm installation.

It is free on WordPress.org, it is on version 1.6.1, and it is tested against MachForm 3 through 30 and WordPress 7.0.

Using the block

Add a block, search for MachForm, and type your form's ID into it. Height, accessible title, embed method, and any URL parameters are in the block sidebar. Nothing to memorize and nothing to mistype.

The editor deliberately shows a summary card instead of a live form. MachForm's loader resizes the form to fit its content, which is exactly what you want on a published page and exactly what you do not want while you are editing around it — and running that loader inside a page builder is what caused the Divi and Yoast conflict this plugin had to work around back in version 1.3. The real form appears the moment you preview or publish.

Using the shortcode

Open the Code screen for your form inside MachForm and note the form's ID and height. Then use the shortcode:

[machform type="js" id=12 height=600]

type takes js, mf, jquery, or iframe. Leave it on the default js — the plugin checks what your MachForm installation supports and picks the modern loader, which needs no jQuery at all, or falls back to the older jQuery one if it has to. Force a specific method with mf or jquery, and use iframe when you need more than one form on the same page.

If you already use the shortcode

Nothing changes. Existing shortcodes keep working exactly as they did, and there is no migration to do. If you would rather move one over, the block editor can transform a shortcode into a MachForm block and it carries the ID, height, type, title, and URL parameters with it.

Why we bothered

A client needed it, the workaround everybody else used was "post a link instead", and it was a couple of hours of work. That is roughly the calculation behind most of the custom development we do — the gap between "almost works" and "works" is usually small and almost always worth closing.

Screens

The block, the shortcode, and the one setting.

The MachForm block selected in the WordPress block editor, with the block sidebar open on the form ID and height fields
The block in the editor. ID and height live in the block sidebar, and the canvas shows a summary card rather than a live form.
The WordPress block inserter with MachForm among the available blocks
Add a block, search for MachForm.
The plugin settings entry in the WordPress admin menu
One settings entry in the WordPress admin.
The plugin settings screen with a single field for the MachForm URL
One configuration option: the URL of your MachForm installation.
The MachForm embed code screen showing the form ID and height
Take the form ID and height from MachForm’s own Code screen.
A WordPress post containing the machform shortcode
Or drop the shortcode into a post, page, or widget area.

Start here

Need a plugin that does one specific thing?

Describe the gap. Small, well-scoped plugins are some of the most useful work we do.