So I would take of on your html form the onsubmit()=…, once isnt needed and your javascript function should only have something like this.
document.getElementById("form_1").style.display = "none";
or
document.getElementById("form_1").style.visibility = "hidden";
this should do the job, if for some reason it does not, change the onclick from the input to the form tag.
Your code should look like so:
<form onclick="myClick()" id="form_1" name="form_order_id" action="#" method="post" >
<input type="hidden" name="frub_id" value="<?= $order->get_id() ?>" />
<input type="submit" name="<?= $order->get_id() ?>" value="<?= $order->get_id() . $edit_form1 ?>" />
</form>
<script type="text/javascript">
function myClick(){
document.getElementById("form_1").style.display = "none";
}
</script>
Related Posts:
- Use wc_enqueue_js only on specific pages – nested add_action
- woocommerce subscriptions – get expiration date [closed]
- How to create a form and display its content as table in admin panel?
- Automated Cart Update With Alert Box Each Time
- Modify HTML structure of fields in woocommerce checkout form
- How to auto fetch customer details in Woocommerce in checkout page
- Sum the total amount of a specific product purchased per user and display in table
- I want to add custom add to cart link [closed]
- Extend Woocommerce Widget Class – WC_Widget_Product_Categories
- Change product_base programmatically
- WordPress shortcode returns the data before
- Can a plugin redirect product page based on IF condition?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- custom post type with role Vendor
- Adding Additional Variables on Menus Page
- Woocommerce custom Plugin in wordpress [closed]
- Add a custom WooCommerce settings tab with sections
- Payment field disappears on custom Paypal plugin
- I am having errors with checkout on wordpress
- product_type_options get saved value [closed]
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- Looping through and combining calls to Woocommerce REST API
- Store user form submitted information in post type
- How to import woocommerce custom fields data into another site?
- How do I remove an action hook inside a class that is called by another class?
- not able to access $_POST on backend profile update
- Custom Plugin Develoment, Form Action
- Using Nonce for my Form
- Trouble using wordpress functions in a pop-up modal form
- How keep woocommerce users separeted in multisite install and keep admins on network
- Custom field fetch error on woocommerce pdf invoice
- Woocommerce Convert existing order to the cart
- How to add product in woocommerce with php code [closed]
- Should I use spl_autoload_register() in my plugin?
- How can I save a multiple select array with the settings API for a plug-in options page?
- How to correctly submit a search form and display the result in an independent page
- Creating custom Woocommerce attribute taxonomies from a plugin
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- Woocommerce, recognize the loop of related products
- Output a WooCommerce product custom field in WooCommerce using get_post_meta()
- Append a term to WooCommerce product existing product category terms
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- Making Quote Plugin more efficient
- Will simple function names in a class structure conflict with other plugins?
- How do I let users upload files to a chosen location?
- How to test nonce with AJAX – Plugin development
- How can i upload images in an admin page?
- How to upload a file to a folder named after the user_id via plugin
- WooCommerce Webhooks not firing because of error in wp-includes/meta.php
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- adjust section according to country?
- Woocommerce change prices for a certain country [closed]
- How to use html inside a functions.php code?
- WordPress Environment: Dynamic Page using shortcode – how to change the page name for sharing
- zip unzip attachments in wordpress
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- Remove item in Checkout
- Woocommerce – get_items() returns empty array
- how to Update 15k products on plugin activation with meta_option
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Using flickr api in custom wordpress plugin
- Toolbar Hidden in a Virtual Page
- Contact form – problem with displaying message about sent mail
- Woocommerce order status payment
- Dynamically added custom fields not displayed on WooCommerce email notifications
- How to correctly escape an echo
- Adding image upload in tag section – WordPress plugin development
- How do I set a hidden field to a value?
- How to Remove Theme Style CSS inside Custom Plugin?
- How to remove Login from in my account page
- How to access specific product id on other pages/posts?
- Get only relevant sub-category of category “Genre” that applies to current product only
- 400 bad request admin-ajax file upload
- Including user data in “new user notification email”
- get Woocommerce product format json for WP_Query
- Add Shortcode to ::before class
- WooCommerce get products based on the taxonomy
- Woocommerce Add custom “Add to cart button” in single page with tags
- The plugin generated 225 characters of unexpected output during activation
- Woocommerce remove menu item on myaccount dashboard
- Parsing webhook from Shopify in WordPress
- Adding action item to admin users table and sending email
- WordPress / PhpStorm / XDebug and plugin_dir_path issues
- woocommerce plugin bugs
- Send data from plugin to external database
- Woocommerce Price Text
- ajax form function error
- Ajax Load More or View More functionality for woocommerce category layout by template overriding
- How do I update product shipping using PHP in WooCommerce?
- How can I edit the WooCommerce Mini DropDown Cart to read as follows
- Use HTML Form Data in PHP Function – WordPress Admin Page
- base64_encode conflict with convert_smilies in wordpress
- Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?
- Contact form with dynamic dropdown and filter
- Redirect loop upon installation of my plugin
- Find owner of coupon
- Customize create table SQL statement in any WordPress plugin