Two issues –
validateForm
is an existing javascript function in WordPress core, change it to something else. Always prefix things with a unique string to prevent these problems.
Your onsubmit
needs return
added: onsubmit="return your_function()"
Related Posts:
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- Plugin Form Submission Best Practice
- How to include jQuery and JavaScript files correctly?
- $_POST form request with admin-post
- Handling results from data hooked into admin_post
- What is the real intention for admin-post.php?
- How to implement color picker from wordpress in my plugin?
- How can I run AJAX on a button click event?
- Add async script
- How to provide translations for a WordPress TinyMCE plugin?
- Can I use the wp media uploader for my own plugin?
- How-to implement admin Ajax inside an admin WP_List_Table?
- API to trigger prompt on leaving page
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- Test to see if jQuery or Prototype is queued by another plugin?
- What is the recommended way to create plugin administration forms?
- Include third party Javascript library which is not included in WordPress
- jQuery in header or footer
- Hook the Keydown Event in the TinyMCE Post Editor
- How to Add a .js file Only in one specific Page Dynamically to Head
- lodash dependency in a Gutenberg plugin
- Using AJAX in a plugin to submit form – REALLY confused
- wp_localize_script $handle
- How to prevent loading of all plugin’s resources?
- How to trap “Publish” button to check for meta box validation?
- Post from front-end with post types, categories and taxonomies
- Pass javascript result to shortcode executer function
- Front-End Form Submission in Shortcode
- Check spam in custom form – akismet
- The changes I make to an external JS file of my WP plugin are only applied after I clear my browser’s cache
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- Use js script from one plugin in another plugin
- Use a PHP file as action for a form in a WordPress plugin, what’s the correct way?
- How do I only load js on the post-new.php and post.php pages in admin?
- creating elements/innerblocks via rangecontrol
- Making a custom widget that includes a tinymce and works in Site Origin Page Builder
- Looking for callback function after Gutenberg is rendered?
- What’s the better way to add an inline script?
- Front-End Interfaces Without Shortcodes
- Can’t get JS code to work with shortcode
- Best Practices for Creating and Handling Forms with Plugins?
- How do I add a javascript file to all admin pages via a plugin?
- Gutenberg: useDispatch is not a function – @wordpress/data included
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- Prevent Javascript Facebook SDK Conflicts in plugin
- Plugin options page – form with two different submit buttons
- How to Load Plugin JS in theme’s footer section
- how to include javascript file and css file in wordpress
- Print WordPress username id inside JavaScript
- Mixing Regular Javascript With jQuery in a Plugin
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- How to sanitize user input?
- Why is my javascript not invoked in my hooks except wp_head?
- Where to call wp_enqueue_script in a plugin with custom template?
- WooCommerce registration password field not displaying
- wordpress plugin php file processing form
- Is there an event or an other method that tells me the preview is loaded?
- How to add custom fields to the all users page
- WordPress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?
- Error on inserting a form value to database
- Multiple options pages validation for a plugin
- How to prevent UNDO on guternberg block editor
- Do I have to worry about useState causing a re-render?
- Creating a custom Gutenberg block with columns
- Tracing dashboard publish settings from input form in WordPress
- Post data in wp-admin to external database
- Multi-part form and wp_redirect()
- Page reload occurs before request finishes
- On one of my sites a file is shown as 404 but the file IS there
- Submitting a plugin form to database in admin page
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- How can i add insertion point between inner blocks in my custom block like core blocks
- How do I access the contents of WordPress Classic editor in admin area with JavaScript?
- How to get the value entered in the input field in wordpres
- How react js and other Javascript Technologies works on WordPress plugin?
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Trouble Importing whatsapp-web.js in a WordPress Plugin Development
- Insert meta-description into Yoast-SEO input-field via JavaScript
- Hook a search form anywhere on the site, using a custom plugin
- Plugin forms overwrite each other’s options
- Reinitiate Gutenburg’s blocks using javascript
- how to add contact form 7 shortcode in javascript variable
- Insert text programmatically in WordPress Gutenberg Editor
- Javascript function defined in view.js not reachable from save.js
- How to move custom gutenberg block controls from settings to styles tab?
- How to use useSelect to retrieve the currently default fontFamily?
- Event when Modal is opened/visible
- How to apply a javascript code on certain parts of elementor made pages?
- Cannot call a class as a function in block plugin react component
- Validate a custom form with js and php
- Extend backbone for add new custom Rest Api
- useBlockProps() nests wrapper with class name inside block wrapper in the editor
- Gutenberg move post/page title to Editor sidebar document panel
- configure additonal build files in the @wordpress/create-block
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?
- WordPress Plugin, Elementor and the ReferenceError nightmare
- Create a zip code form