| 开发者 | laymance |
|---|---|
| 更新时间 | 2026年8月19日 04:07 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
type=js - the default. Automatically uses the modern method if your MachForm supports it, and the jQuery method if it does not. You normally do not need to think about this.type=mf - forces MachForm's modern javascript loader (js/mf.js). One script, no jQuery, and the form resizes itself to fit.type=jquery - forces the older jQuery loader. Only needed if your MachForm is too old to include js/mf.js.type=iframe - a plain iframe with no javascript. Fixed height, but you can use as many on one page as you like.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.
Please let us know and we'll get it fixed right away. Contact us via our website at www.laymance.com.
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.
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.
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.
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.
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.
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.
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.
Most likely! Shoot us an email at support@laymance.com and tell us what you want added, we'll do our best!