• Resolved nessi

    (@nessikd)


    Hello,
    I’m writing to you to discuss one thing about your plugin YITH WooCommerce Wishlist. I’m using it for a while and it offers me everything I wanted with wishlists. But the thing is i stubled upon one issue or maybe intended funcionality. When I want to change title for my list and submit form with “ENTER” it reloads wishlist page but with old title. The new one is probably not saved in database.
    I’ve tried to do a little workaround with custom JS function, but it didn’t do well. So I’m wondering now if you can do something like that. I know that I can save it with tick icon, but I think many users also use enter key to submit forms.
    Hope to hear from you soon!

    Kind Regards,
    Mateusz

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello there,

    Thanks for your reply, we hope you are doing well 😄

    Please try inserting the following code snippet into your active theme’s functions.php file:

    if (!function_exists('yith_wcwl_edit_title_wishlist')) {
        function yith_wcwl_edit_title_wishlist(){
            $jquery = 'jQuery(".hidden-title-form > input").keypress(function(event) {
                if (event.keyCode === 13) {
                    event.preventDefault();
                    jQuery(".save-title-form").click();
                }
            });';
            wp_add_inline_script('jquery-yith-wcwl', $jquery);
        }
        add_action('wp_enqueue_scripts', 'yith_wcwl_edit_title_wishlist', 999);
    }

    Let us know any news, please.
    Have a nice day!

    Thread Starter nessi

    (@nessikd)

    Hello Luciano,

    Thanks for reply, I’ve tried this code snippet and it solved my issue. It works perfectly fine now.

    Thanks again!
    Kind regards,
    Mateusz

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change title on form submit issue’ is closed to new replies.