Remove required entries in customer-new.php
-
AuthorPosts
-
-
August 3, 2020 at 8:19 PM #587414nimda24Participant
Hi!
Some fields in customer-new.php are in our case not required. If I delete the word required in the source code the form says, the fields are still required. Maybe someone can help me with that problem?
Original:
<li class=”hb-form-field”>
<label class=”hb-form-field-label”><?php echo esc_html__( ‘Adresse’, ‘amihomestay’ ); ?></label>
<span class=”hb-required”>*</span></label><div class=”hb-form-field-input”>
<input type=”text” name=”address” value=”<?php echo esc_attr( $customer->address ); ?>” placeholder=”<?php echo esc_attr__( ‘Adresse ‘, ‘amihomestay’ ); ?>” required />
</div>Modified:
<li class=”hb-form-field”>
<label class=”hb-form-field-label”><?php echo esc_html__( ‘Adresse’, ‘amihomestay’ ); ?></label><div class=”hb-form-field-input”>
<input type=”text” name=”address” value=”<?php echo esc_attr( $customer->address ); ?>” placeholder=”<?php echo esc_attr__( ‘Adresse ‘, ‘amihomestay’ ); ?>” />
</div>Maybe another file has to be modified?
Thank you!
-
August 4, 2020 at 9:34 AM #587559DaisyModerator
Hi nimda24,
Please give me your site URL and WordPress admin account by using “access information”, see instruction here https://thimpress.com/knowledge-base/send-sites-access-information/, I will check all your issue.
And please backup your website and before we do anything on your website.
———–
Yours Sincerely,
Daisy
-
August 4, 2020 at 2:27 PM #587638nimda24ParticipantThis reply has been marked as private.
-
August 10, 2020 at 11:43 AM #589348AugustusKeymaster
Dear nimda24,
You need contact with the developer of your theme, we see they have overwritten template of us
Best regards,
Augustus
-
August 10, 2020 at 9:19 PM #589523nimda24ParticipantThis reply has been marked as private.
-
August 11, 2020 at 3:49 PM #589854AugustusKeymaster
Dear nimda24,
Step 1: Go to wp-content\themes\yourtheme\wp-hotel-booking\checkout\customer-new.php remove required at input name address
Step 2: Go to wp-content\plugins\wp-hotel-booking\assets\js\hotel-booking.js remove this code line 143 to 148var $address = $form.find('input[name="address"]'); if ($address.length === 1 && !$address.val()) { // alert( hotel_booking_i18n.empty_customer_address ); mesgs.push(hotel_booking_i18n.empty_customer_address); $address.parents('div:first').addClass('error'); }
Step 3 : Find this code at wp-content\plugins\wp-hotel-booking\wp-hotel-booking.php then change hotel-booking.min.js to hotel-booking.js
wp_register_script( 'wp-hotel-booking', $this->plugin_url( 'assets/js/hotel-booking.min.js' ), $dependencies, WPHB_VERSION, true );
Note: Please backup before change
Best regards,
Augustus
-
-
AuthorPosts
You must be logged in to reply to this topic. You can click here