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 change product SKU’s in bulk with a plugin
- How to automatically apply woocommerce product title to all product images alt tags?
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- Dynamic URL to reference custom PHP files
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- WP_Query | Help me create a search term with an ‘OR’ relation?
- Prevent multiple counts by same user – WP PostViews plugin
- WooCommerce – Customer Order History Pagination
- The values of custom fields are not available functions.php
- submit the form to same page
- Theme url in all plugin pages
- How to access function from outside of a class within this class in WP plugin?
- PHP can I add line numbers to file_get_contents()
- write custom woocommerce templates and forms
- WooCommerce – Email admin with new user details
- Accessing data from a non-WP database/table within a page content
- Custom profile field with birthday. Troubles with
- Issue adding sub category programmatically
- How to sanitize any integer input field in wordpress?
- Reload part of checkout on changed shipping method
- Woocommerce related product text
- Adding widgets to my plugin page instead of WordPress dashboard
- How to insert data into database using wp cron job
- How to make products with no cost in WooCommerce
- Input data from email form not going to JSON file
- Access Child Class of Plugin Main Class Instance
- How to show a ‘correct’ message after submit a form?
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- Add post with approval by the admin
- What does -> mean in WordPress?
- How to optimize update_post_meta?
- CSS change in woo commerce Place Order Text [closed]
- Exclude product attributes from taxonomy terms loop
- WP All Import / Update stock quantity from multiple XML files
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Modify WooCommerce used to get all orders in dashboard
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Add a product category to a specific product via a button
- WordPress can’t use ZipArchive
- How to change basename url for wp-admin?
- Woocommerce display orders with products from specific categories to specific admins
- WordPress loading progess – wp-blog-header.php
- Illegal string offset checkbox
- wp_update_post gives 500 internal error
- Don’t update modified post date when user add a product review or comment?
- How do I change the “login” label in My Account page to “Registered Customer”
- Customize the “Available for back order” text for specific variation
- register_setting not save checkbox
- How to add custom attribute to all outofstock and all instock products automatically?
- Site infected by link
- Add Product Permalink in woocommerce admin order page
- How to give custom roles the capability to edit one Menu instead of every Menu
- sessionStorage saves input value in browser but it is not loaded in the form field
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- Private messaging – Getting and displaying the avatar/url of a message recipient
- How to remove image on single product and get product to span page?
- widget: input the px value from user and use it as inline style in widget function
- How to pass username into form that sends data to database
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- Adding placeholder text field to woocommerce checkout [closed]
- Custom taxonomy with page post type – WordPress
- I want to lists posts in wordpress to nearest location entered by the user
- Why does WordPress not send the user the email to add a password?
- Remove slug of multiple custom post types with and without hierarchical
- Custom Search Function in WordPress Returns No Results
- Automatically populating a date parameter within a shortcode