| 开发者 | furao77 |
|---|---|
| 更新时间 | 2026年10月2日 14:00 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL2 |
| 版权网址: | 版权信息 |
DONOTCACHEPAGE constant, which caching plugins such as WP Super Cache, W3 Total Cache, WP Rocket, and LiteSpeed Cache respect.
Some caches ignore these signals. Examples are a CDN rule that overrides the origin's cache headers (such as a Cloudflare Edge TTL setting that ignores the Cache-Control header), nginx FastCGI Cache or Varnish when configured to ignore them, and a hosting company's own page cache. If you use one of these, please exclude the form page URLs (input, confirmation, completion, error) from caching.
If you place a form outside the page content (in a widget, a synced pattern, or a theme template), caching plugins still skip the page, but the HTTP headers may already have been sent. In that case, exclude those URLs from CDN and server-level caches manually.
After updating to 1.3.0, please purge your page cache and CDN cache once so that previously cached copies of your form pages are removed.
CSS Styling
This plugin does not include any frontend CSS for form display. You are expected to style the forms using your own theme's stylesheet. HTML/CSS samples are available for reference on the plugin's website.
lw-simple-forms folder to the /wp-content/plugins/ directory[lwsf_input id="123"] - For the input screen[lwsf_confirm id="123"] - For the confirmation screen (optional - leave empty to skip confirmation)[lwsf_complete id="123"] - For the completion screen (optional - displayed on the input screen URL if omitted)[lwsf_error id="123"] - For the error screen (optional - errors are displayed on the input screen if omitted)Navigate to LW Simple Forms → Add New Form in your WordPress admin, configure the form settings, and save. You'll then need to add the appropriate shortcodes to your pages.
After creating your form HTML, use the "Parse HTML" button to detect form fields automatically. Then you can mark fields as required in the "Validation Settings" section.
Yes. Simply leave the "Confirmation Screen URL" field empty, and the form will skip straight to completion after submission.
Data is temporarily stored in the database for one hour. After this period, the data is automatically deleted.
Yes. The plugin is designed to work both with and without JavaScript. All validations and form processing have server-side fallbacks.
Since version 1.3.0, pages whose content contains a form shortcode are automatically excluded from caching by most caching plugins and by CDNs that follow the page's cache headers. You only need to exclude the form page URLs manually if your cache ignores these headers (for example a CDN rule that overrides the origin's cache headers, a server-level cache configured to ignore them, or a hosting company's own page cache), or if the form is placed outside the page content. Note that a form placed in a sitewide widget or footer turns off page caching on every page where it appears. See "Page Cache and CDN Compatibility" in the Description.
Currently, the plugin uses standard error messages. Future versions may support customizable validation messages.
Yes. The plugin properly handles special characters and different encodings, but it's recommended to use UTF-8 encoding.
Enter a field name (usually an email field) in the "Recipient Email Address Field" setting under "User Auto-send Email Settings". e.g. If the name attribute of the email field is set to "your-email", you should write it as [lwsf_field_your-email].
DONOTCACHEPAGE constant (respected by WP Super Cache, W3 Total Cache, WP Rocket, LiteSpeed Cache, and others), and also notifies LiteSpeed Cache through its API. This prevents submissions from failing because a cached input page kept an expired security token, and stops cached completion pages from showing one visitor's data to others.no-store directive is left out of the no-cache headers so that browsers can still restore typed values when a visitor presses Back on the confirmation screen. private already keeps CDNs and other shared caches from storing the page. For logged-in users, no-store is kept as WordPress sends it.lwsf_prevent_page_cache filter. Return false to turn off the automatic cache exclusion.name, p, s, page). Case-sensitive comparison: Name is allowed, name is blocked.<form>, <button>, and <textarea> with their common attributes. This ensures confirmation screen buttons and form elements retain their HTML attributes (e.g., class, id).wp_unslash() to prevent double-escaping issues caused by WordPress wp_magic_quotes() (e.g., I'm no longer becomes I\'m).wp_kses removing trailing semicolons in style attributes. Warning messages now show the actual changed lines instead of a generic message.?lwsf_complete=1&key=...) which caused 404 errors due to WordPress interpreting query parameters. Email is now sent within the REST API call, and a flag is returned to JavaScript.async attribute to lwsf.js breaks form functionality. Workaround: exclude lwsf-form-handler in the async-javascript plugin settings.