• Resolved userdesignfleek

    (@userdesignfleek)


    Input fields with types other than “text” do not get the “woocommerce-invalid” and “woocommerce-invalid-required-field” classes when submitting the place order form. As a result, these fields do not display a red border to indicate they are invalid or required. We have confirmed that the required and enabled checkboxes are checked for these fields in the plugin settings.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Dina S.

    (@themehighsupport)

    Hi,

    Could you please temporarily deactivate our plugin and verify it from your side. If the issue still persists then this issue is not related to our plugin. If the issue is getting resolved after deactivating our plugin then please do let us know.

    Thank you!

    Thread Starter userdesignfleek

    (@userdesignfleek)

    We have deactivated your plugin, and the issue is resolved. However, when we reactivate your plugin to add additional fields to our checkout forms, the issue reappears. Specifically, form fields from your plugin, other than input type text, do not display any form errors to the user. For instance, we have a required select dropdown. If the user does not select an option and submits the checkout form, there is no indication that this dropdown is required—no red borders, no text indicating the requirement, nothing. All other checkout form input fields indicate errors, but the input fields from your plugin do not.

    Plugin Support Dina S.

    (@themehighsupport)

    Your issue needs a detailed check. Can you please raise a ticket through our website? We hope our technical team will be able to help you.

    Thank you!

    Plugin Support Dina S.

    (@themehighsupport)

    We have fixed the issue by adding the below code snippet.

    add_action('wp_footer', 'th_add_red_border');
    function th_add_red_border(){
    ?>
    <script type="text/javascript">
    (function($){
    $(document).on('checkout_error', function(event, errors){
    var datetime_value = $('input[type="datetime-local"]').val();
    const datetime_wrapper = $('input[type="datetime-local"]').closest( '.validate-required' );
    check_value_exists(datetime_value, datetime_wrapper);
    var time_value = $('input[type="time"]').val();
    const time_wrapper = $('input[type="time"]').closest( '.validate-required' );
    check_value_exists(time_value, time_wrapper);
    });

    $('select,input[type="datetime-local"],input[type="time"]').on('change', function(){
    const wrapper = $(this).closest( '.validate-required' );
    var selected_value = $(this).val();
    check_value_exists(selected_value, wrapper);
    });

    function check_value_exists(selected_value,wrapper){
    setTimeout( function(){
    if( selected_value == null || selected_value == '') {
    wrapper.addClass('woocommerce-invalid'); // error
    } else {
    wrapper.addClass( 'woocommerce-validated' ); // success
    wrapper.removeClass( 'woocommerce-invalid' ); // success
    }
    }, 1000 );
    }
    })(jQuery, window, document)
    </script>
    <?php
    }

    Thank you!

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

The topic ‘Pixie Plugin Support Submission’ is closed to new replies.