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:
- 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
- How can I run AJAX on a button click event?
- How to provide translations for a WordPress TinyMCE plugin?
- Can I use the wp media uploader for my own plugin?
- 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?
- jQuery in header or footer
- Hook the Keydown Event in the TinyMCE Post Editor
- lodash dependency in a Gutenberg plugin
- Using AJAX in a plugin to submit form – REALLY confused
- wp_localize_script $handle
- Post from front-end with post types, categories and taxonomies
- Front-End Form Submission in Shortcode
- Check spam in custom form – akismet
- How do I only load js on the post-new.php and post.php pages in admin?
- creating elements/innerblocks via rangecontrol
- Front-End Interfaces Without Shortcodes
- Can’t get JS code to work with shortcode
- How do I add a javascript file to all admin pages via a plugin?
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- Plugin options page – form with two different submit buttons
- How to Load Plugin JS in theme’s footer section
- How to sanitize user input?
- WooCommerce registration password field not displaying
- wordpress plugin php file processing form
- 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
- Creating a custom Gutenberg block with columns
- Form doesnt save to database
- Gutenberg: import dependency or assign from global variable?
- javascript datatables in a plugin
- Create custom HTML/JS app inside page
- Plugin Development for registered users
- Is there documentation reference for forms in menu and setting pages?
- Input in plugin widget does not allow spaces
- add javascript files only when plugin is called?
- Avoid updating post when sending POST or GET request to post.php
- How can I avoid conflicts between plugin and theme?
- How to control an elements classes from multiple Gutenberg sidebar controls?
- How should I go about registering JavaScript that isn’t a file? [duplicate]
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- should i be checking for jquery before enqueing it in a plugin
- How can I add a simple custom field to my plugin?
- Loading custom js file on the admin page through plugin
- Custom Plugin – CSS works, JS doesn’t
- The Correct Way to Use Nonce Field without Settings API
- Translate javascript with WordPress built-in localization API for static strings
- Catching Form Submission in WordPress Admin Panel
- How to add a panel/box/widget/are/screen to the right side of edit post/page confusion
- Insert Into Post Not Working For Audio File Using jQuery
- Service Worker Uncaught (in promise) DOMException
- Developing the save function in Gutenberg blocks
- About a programming language starts with [closed]
- Submit form to a different PHP file in the same plugin folder
- A function that will remove HTML and tags from a string?
- Should I put my plugin javascript inline?
- Lead form that submits to 2 external APIs
- WordPress: redirecting to the form page after form submission to admin-post.php
- wp.media libary pdf type
- Query String Filtering API
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?
- How to create a custom post-new.php page for plugin , no wp menu
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- converting a node.js project into a wp plugin
- Is “document loaded” different on admin side than public side?
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- jQueryUI draggable doesn’t work in WordPress plugin
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Load script on frontend from widget plugin
- Append php file to footer
- XMLHttpRequest to open PHP file responds with Missing Page
- Using JavaScript in WordPress page to call for server data using AJAX
- Filterable posts using categories
- How to Maintain url on form submit
- Uncaught ReferenceError: kpoejy is not defined
- form does not generate $_POST request
- Form and database, plugin development
- Can I use a hook other than ‘init’ to handle form submissions?
- wp_mail links are dead
- 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 can i add insertion point between inner blocks in my custom block like core blocks
- 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
- Trouble Importing whatsapp-web.js in a WordPress Plugin Development
- Hook a search form anywhere on the site, using a custom plugin
- Plugin forms overwrite each other’s options