checkout form fields and 'clear' property
-
In the woocommerce checkout page some fields of the form billing are not aligned correctly for some countries.
i saw that the issue is resolved if i add a <div class=”clear”></div> after the postcode field, the function woocommerce_form_field( $key, $args, $value = null ) ( located at woocommerce/includes/wc-template-functions.php ) adds that div if $args[‘clear’] is not empty. The function it’s called in a foreach in the checkout/form-billing.php file.My $args contains the clear attribute correctly and woocommerce_form_field returns the field with div correctly (mailed myself the data from the function), when i get to the page the div is not there and fields are not aligned.
I noticed that if i try to echo something it doesn’t appear on the page source but if i mail the data from the same spot in form-billing.php, the email is received correctly.
How can i make the div show correctly ? What javascript could rewrite the form and where can i edit it ?link:
https://buy.bepro-favero.com/checkout/
you need to have something in the cart, i.e. Kit 4 alignment labels.
The fields go out of alignment if you select United States in the country select.
Any suggestion would be appreciatedP.S.: i added some javascript that adds the div on window.onload but it feels dirty and i’m not sure it works in every case.
- The topic ‘checkout form fields and 'clear' property’ is closed to new replies.