If you’re placing a button in a meta box, it is included within the FORM tags for a post. A simple answer is no, you shouldn’t place a submit button in the post form. However, nstead of using a normal input[type=submit]
, use the following:
<button type="button" name="button-name" id='button-id'>Button Text</button>'
A click won’t process as a submit action, it will just click. You obviously will need to bind the click event to however you’re importing your file list. If you’re not using AJAX, you should. Check out this article on how to use AJAX in WordPress.
Having a submit button within the form will post to post.php and certainly will have unwanted effects, namely losing any changed data within the post form.
Related Posts:
- What is & used for
- How to include landing page with form submission?
- How to edit a user profile on the front end?
- How to display user registration form on front-end of the website?
- Is wp_nonce_field vulnerable if you know the action name?
- Creating a contact form without a plugin [closed]
- Autocomplete for taxonomy input boxes on a front end form
- set_query_var doesn’t seem to work on init hook
- How to send multipart form data to WordPress endpoint
- Placeholders in Jetpack Contact Form [closed]
- $_POST empty on submit (same code, same form submits normally on local server)
- Loading scripts & styles from a meta box callback function
- One comment per user per post
- Looking for a simple approach for handling user $_POST data without AJAX?
- How to return variables from admin-post.php
- Setting specific image size for specific form upload file field
- Get data from dropdown and update page
- How to Process Form Request
- limit characters when posting from form
- Adding data to an array in usermeta and displaying it in a loop
- Help with forms and nonces
- Stripe Error: must provide source or customer [closed]
- How to submit form in a PHP file in WordPress?
- How to redirect new WordPress user to previous page after registering
- WPForm, how to set date to tomorrow
- php form create 2 posts
- Create form on plugin options page that creates submenu pages for that plugin
- Creating a contact form with Laravel frontend
- Contact Form 7 – Add a Info Text to Checkboxes/Radiobuttons [closed]
- How to make WordPress forms secure (HTTPS)
- Can you have more than one nonce on a page?
- Post submit using shortcode and init
- Password protected page with a form submits for me fine but for others redirects them back to the password prompt
- What form element names break wordpress?
- Remove field in the form : only works for “url”, not for “email”?
- I am trying to grab the title and put it in a paypal form select option
- How to add required fields in user profile admin page?
- Java code/ JSP page in wordpress
- Should I use wp_nonce_field on my contact form?
- how to add a custom form in a page
- Form Submission Warning: Cannot modify header error only when plugin is deactivated
- Create a registration form with a PayPal checkout fee? [closed]
- Programmatically populate form fields with data
- comment form name and email not working?
- advanced custom fields and contact form 7
- Stop SPAM from custom form
- Sort populated GravityForms list alphabetically [closed]
- Checkboxes in a wordpress form are not showing as checked when selected [closed]
- Radio&Checkbox buttons Contact form 7 not clickable
- Complex Timesheet Form
- Custom tables and using wpdb to insert into DB from a html form
- How to add a placeholder to the protected post password input
- Send value of PHP variable in template via hidden field in a form
- How to change a form end email?
- Saved emails at dashboard
- Fatal error: Call to undefined function wp_insert_post()
- Simple form validation for custom post type in front end. Not working
- WordPress Frontend Post Form (Bootstrap Modal) Not Creating Post
- How to use HubSpot Forms API in WordPress pages?
- Inquiry form like on URL [closed]
- Update user meta on custom wordpress form and redirect
- Headers already sent on a frontend post form using wp_redirect before get_header
- Email from my theme’s contact form doesn’t get the reply-to address right
- how do i make the “contact us” on a page created not to display
- Cannot modify header form resubmits data on refresh
- Email form getting hacked
- sending form with time interval
- How to redirect a Link to a new tab in contact form 7?
- How do I implement form handling when form is custom HTML?
- how do I hide or encrypt query strings for gravity forms
- Why is my contact form not working?
- Save and retrive data from a custom form to database
- WPAdverts – How to limit form submission 10 per month
- Using an iframe for a form help
- Fatal Error with WP Forms
- How to call or add password input / generate password / password strenght meter in custom registration form?
- Need to show results on the frontend of an admin form
- Form data being sent to parent directory
- Form submissions that require users ID# [closed]
- fetch custom post if meta key exist
- Passing form data on submit
- Create a custom calculator in wordpress
- How to stopping auto scrolling after submitting the form?
- Preventing form resubmission on contact form plugin
- Plugin to get a result based on form checkbox
- How to handle dynamic form data with repeating fields?
- Pay before posting (frontend insert post)
- Passing input value into name of input
- wp_insert_post with POST data
- Adding a “Report the post” button/form?
- wordpress not saving form code in code editor
- Create register form plus send post
- Auto populate a Form
- Dropdown List Won’t Display Selected Option After Submit / Refresh
- Submit button returns to index page instead of sending data
- Order form for WP (similar to a wishlist) [closed]
- Dynamic price for payment button
- Is it possible to change the error message “This is a required field” for all checkout fields? [closed]
- How to use tag in wordpress?
- How to reproduce the post format field in a front end form?