Linux 软件免费装
Banner图

MachForm Shortcode

开发者 laymance
更新时间 2026年8月19日 04:07
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

forms shortcode block MachForm AppNitro

下载

1.2 1.3 1.4 1.4.1 1.1 1.6 1.6.1 1.0 1.5.0

详情介绍:

MachForms is an excellent, easy to use form builder that you host on your own server or site. Embedding one of those forms in WordPress used to mean "jumping through some hoops". Not any more. Add a form with the MachForm block in the block editor (Gutenberg): insert the block, type your form's ID, and you are done. Prefer shortcodes, or working in the classic editor or a page builder? The [machform] shortcode does exactly the same job and both produce identical markup. Need a form in a blog post? On a page? In a widget area? No problem. For more information, check out the plugin page on our website. Features include: Easy to use! This plugin isn't just for developers, no matter what your skill level you can use this plugin to easily add forms from your MachForms system to your website! How to use the block editor block:
  1. Click the "Code" option on your form inside of MachForm to see the embed codes, and make note of your form's "ID" and "height".
  2. In the block editor, add a block and search for "MachForm".
  3. Enter your form's ID. Height, title, embed method and URL parameters are all in the block sidebar.
  4. You are done! The form appears on the published page. The editor shows a summary card rather than a live form, so the form cannot resize itself while you are editing around it.
How to use the shortcode:
  1. Click the "Code" option on your form inside of MachForm to see the embed codes.
  2. Make note of your form's "ID" and the "height".
  3. Use the shortcode to embed your form into your content using this format: [machform id=(ID #) height=(height #)]
  4. You are done, your form should show in your content now!
The shortcode and the block produce exactly the same markup, so you can use whichever suits you and mix them freely. Embed methods: URL Parameters: The plugin now supports URL parameters. The parameters are easy to pass via the shortcode by simply including the parameter and value inside of the shortcode like the following example: [machform type=js id=1593 height=703 element_1_1="Field Text Here" element_1_2="Field Text Here"] For more information on using URL Parameters with MachForm, please see their website by clicking here. Review or Rating Don't forget to leave a review or a rating, and also connect with us on social media! Thank you for your support. IMPORTANT NOTE: MachForms is a 3rd party application sold by AppNitro. Installing this plugin allows you to use a shortcode anywhere on your site to embed a form that is created in MachForms. This plugin does not provide a form builder interface.

安装:

  1. Install MachForm Shortcode either via the WordPress.org plugin directory, or by uploading the files to your server
  2. After activating MachForm Shortcode, navigate to the "MachForm Shortcode" menu link under "Settings" in your WordPress admin.
  3. Supply the URL/location of your MachForm installation and click "Save Configuration".
  4. You're done! Add forms to your site with the "MachForm" block in the block editor, or with the [machform] shortcode.

屏幕截图:

  • Adding the MachForm block from the block inserter.
  • Menu location for configuration.
  • Configuration screen.
  • MachForm embed example, where to get the ID and height.
  • Sample usage in a new post.

升级注意事项:

1.6.1 Documentation only. Corrects the stated MachForm compatibility to versions 3 through 30 and mentions the block in the plugin description. There are no functional changes, so you can safely skip this one if you are already on 1.6. 1.6 Adds a MachForm block for the block editor, plus support for MachForm's modern javascript embed method which needs no jQuery. Also fixes several bugs from 1.5, including uppercase shortcode values such as type=IFRAME rendering nothing, and a fatal error on PHP 8. Existing shortcodes keep working unchanged.

常见问题:

What version of MachForm does this plugin work with?

The plugin has been tested with MachForm versions 3 through 30, version 30 being the current MachForm release. If you do run into a problem with a particular version, please let us know and we'll get it fixed - it helps a lot if you can send us a sample form and a copy of what its embed code looks like. You can contact us by visiting our website at www.laymance.com.

I've found a bug, what can I do?

Please let us know and we'll get it fixed right away. Contact us via our website at www.laymance.com.

What is the shortcode format?

Here is how to use the shortcode: [machform id=(ID #) height=(height #) type=("js", "mf", "jquery" or "iframe") title=("Form name")] If the "type" is not given, it will default to the javascript ("js") method, which picks the best javascript loader your MachForm installation supports. The "title" is optional. It sets the form's accessible name, which screen readers announce. If the "height" is not given, it will default to a height of 800 pixels. But please give the height to ensure that your form appears correctly! The ID is a REQUIRED field.

Is there a block for the block editor?

Yes. Add a block and search for "MachForm". Enter the form ID, and set the height, title, embed method and any URL parameters in the block sidebar. If you already have posts using the [machform] shortcode, they keep working exactly as before. You can also convert one: select the shortcode block and use the block transform to turn it into a MachForm block, which carries over the ID, height, type, title and any URL parameters.

Why does the block not show the actual form while I am editing?

On purpose. The block shows a summary card in the editor instead of a live form. Loading MachForm's loader script inside the editor is what caused conflicts with page builders that this plugin had to work around in version 1.3, and a form that resizes itself is awkward to edit around. The real form appears as soon as you view or preview the page.

Can I put more than one form on the same page?

Yes, but use the iframe method for them: [machform type=iframe id=1593 height=703] Both javascript methods rely on a fixed element ID that MachForm's own loader scripts look for, so only one javascript form can work on a given page. The iframe method has no such limit.

Which javascript embed method am I using?

Go to Settings > Machform Shortcode and look for "Embed method in use". The plugin checks once whether your MachForm installation provides the modern js/mf.js loader and then uses the best method available, so type=js does the right thing without you having to choose. If your install could not be reached from your web server (for example it is behind a firewall or HTTP authentication), the plugin assumes the older jQuery method, which works on every version of MachForm. Your forms will still work. You can force a specific method with type=mf or type=jquery if you need to.

What is the difference between the modern and jQuery javascript methods?

They do the same thing: both replace the placeholder with an iframe that automatically resizes itself to fit the form, and both scroll to the top of the form after a submission. The difference is what gets loaded. The modern method loads a single 7KB script and needs no jQuery at all. The jQuery method loads two scripts and depends on jQuery being present. The modern method is therefore lighter, involves fewer third party requests, and is unaffected by themes or page builders that remove or defer jQuery. It requires a reasonably current version of MachForm.

My form does not appear on an HTTPS page. What is wrong?

Make sure the MachForm URL you saved on the settings screen starts with https:// and that your MachForm installation is reachable over HTTPS. A browser on an HTTPS page will block the form's script or iframe if it is served over plain http://. As of version 1.6 the plugin assumes https:// when you enter a URL without one.

I want the plugin to do XXX or have feature XXX, can you add it?

Most likely! Shoot us an email at support@laymance.com and tell us what you want added, we'll do our best!

更新日志:

1.6.1 1.6 1.5 1.4.1 1.4 1.3 1.2 1.1 1.0