Answer the question
In order to leave comments, you need to log in
Correct output of product delivery forms?
I have difficulties with the output of the delivery forms in the correct form, namely in the customization of forms, since there is no html code (at least I did not find it).
The code should be like this:
<div class="zagolovok">
<p class="wrtadres">Введите адрес</p>
<input class="wrtadres_form" type="text" name="adress" placeholder="ул. Lorem Ipsum">
</div>
<p class="form-row form-row-first validate-required thwcfe-input-field-wrapper validate-required" id="billing_first_name_field" data-priority="30" data-rules="" data-rules-action="" data-validations="validate-required"><label for="billing_first_name" class="">Имя <abbr class="required" title="обязательно">*</abbr></label><span class="woocommerce-input-wrapper"><input type="text" class="input-text thwcfe-input-field" name="billing_first_name" id="billing_first_name" placeholder="" value="" autocomplete="given-name" /></span></p>
function change_woocommerce_field_markup($field, $key, $args, $value) {
if( $key === 'billing_first_name') {
$field = '<div class="zagalovok">
<p class="wrtadres " id="'.esc_attr($key).'">Ваш адрес</p>
<input class="wrtadres_form" type="text" name="adress">
</div>';
}
return $field;
}
add_filter("woocommerce_form_field","change_woocommerce_field_markup", 10, 4);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question