Intuitive WordPress contact form
- tweaked order of plugin headers
- changed how frontend scripts are loaded so the contact form JavaScript is enqueued when the shortcode actually renders, instead of trying to detect it from page content
- ensures the contact form works reliably when used in pages, custom templates, blocks, widgets, or via
do_shortcode() - removes brittle shortcode detection logic based on parsing post content
- no changes to access control; the contact form is still restricted to logged-in users only
- bumped
Tested up to:to 6.9
- added
Reply-Toemail header using the logged-in user's address
- fixed slashes in input fields using
wp_unslash()before sanitizing
- added support for
[contact_form show_url="false"]to optionally hide the URL field - email body skips "URL" line if field is empty or hidden
- fixed response div element name to
#contact-form-response - added color styling for JS success and error messages
- moved order/subscription dropdown above subject field
- improved dropdown labels to include product or subscription names
- initial release
- supports PHP 7.0 to 8.3
- no settings page
- uses
[contact_form]shortcode only - displays simple contact form for logged-in users
- automatically pre-fills full name and and phone from WooCommerce billing data (and email from WordPress user data)
- falls back to using display name if full name is unavailable or empty
- optional drop-down select of WooCommerce orders and subscriptions to reference
- optional URL field
- validates fields with AJAX and HTML5
- sends submission to site admin email using
wp_mail() - includes nonce security verification and
$_POSTfield whitelisting - includes AJAX error handling and status messages