• Resolved netrebelos

    (@netrebelos)


    My wordpress theme template:

    <p class=”form-row form-row-wide address-field update_totals_on_change input-field validate-required woocommerce-validated” id=”billing_country_field”>

    or

    <p class=”form-row form-row-last input-field validate-required validate-phone” id=”billing_phone_field”>

    How can I convert the rows created by WooCommerce Poor Guys Swiss Knife to have these extra classes?

    https://wordpress.org/plugins/woocommerce-poor-guys-swiss-knife/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author ulihake

    (@ulih)

    Hi netrebelos.

    Thanks for your feedback. Good question. I will provide a solution for this to allow you to render the class for custom billing and shipping fields if desired.

    Regards.
    uh

    Thread Starter netrebelos

    (@netrebelos)

    Hello, do you mean that you will implement it on next update?

    Can you give a temporar solution? For example all classes for billing and shipping fields to be input-field?

    Thanks

    Plugin Author ulihake

    (@ulih)

    Hi netrebelos.

    You can place this code inside the js configuration option in Checkout Settings:

    jQuery(document).ready(function($) {
    	$('.woocommerce-billing-fields, .woocommerce-shipping-fields').find('p[id^="billing_"],p[id^="shipping_"]').each( function() {
    		$(this).addClass('input-field');
    	});
    });

    This should attach the class input-field to all shipping and billing fields. Starting with this code it should be easy to adapt it to your needs.
    Regards.
    uh

    Thread Starter netrebelos

    (@netrebelos)

    Thanks a lot. I will try it and I will tell you.

    Thread Starter netrebelos

    (@netrebelos)

    Yeah baby, it works!!!! Thanks a lot! I suggest you to implemet it as an option. For ever field that the user creates, there will be a class input field. So the user can write the classes (seperated by comma).

    Plugin Author ulihake

    (@ulih)

    You can add css classes for custom fields now. You find the configuration in Checkout Settings.
    Regards.
    uh

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Class’ is closed to new replies.