HIDE/ DELETE Traveler Info and Billing Fields

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22459
    sinergianegocios
    Participant

    Hello I need support for:

    1. HIDE or DELETE SEVERAL FIELDS ON BOOKING FORM.

    I will like to HIDE or DELETE the following fields on the booking form:

    Traveler info fields:
    wp_travel_country_traveller (HIDE OR DELETE)
    wp_travel_date_of_birth_traveller (HIDE OR DELETE)
    wp_travel_gender_traveller (HIDE OR DELETE)

    Billing fields:
    wp_travel_billing_address_heading (HIDE OR DELETE)
    wp_travel_address (HIDE OR DELETE)
    billing_city (HIDE OR DELETE)
    wp_travel_country (HIDE OR DELETE)
    billing_postal (HIDE OR DELETE)

    2. CHANGEING STYLE PADDING ON EQUIRY FORM

    Need to reduce the padding of this form to 5 px all

    need urgent support !!

    Regards

    Miguel Zacarias C.

    #22464
    Support Team
    Keymaster

    Hello @sinergianegocios,

    The default field in the form cannot be deleted and edited. Only newly added fields through the WP Travel field editor can be added and edited.

    But if you want to delete the fields in billing field, traveler info field then you can do so using the filter through the child theme.

    To know how you can create and activate the child theme please refer to below given link:
    https://wptravel.io/how-to-create-a-child-theme/

    After activating the child theme in your child theme functions.php add below given code.

    Example:

    function wp_travel_billing_form_edit_fields( $checkout_fields ) {
    
    	unset(
    		$checkout_fields['traveller_fields']['country'],
    		$checkout_fields['billing_fields']['billing_city']
    	);
    	return $checkout_fields;
    }
    
    add_filter('wp_travel_checkout_fields','wp_travel_billing_form_edit_fields');

    Hope this helps.

    If you have any issues further then kindly let us know.

    Thank you.

    #22503
    sinergianegocios
    Participant

    Hello, when trying to add the filter this message appears on Word Pres Funtion´s Child Team:

    It has not been possible to contact the site to check for fatal errors, so the PHP change has been reversed. You will have to upload the change to your PHP file by other means, such as using SFTP.

    why is this happening, need to resolve this!

    #22537
    wensolutions
    Keymaster

    Hello,

    Actually, due to server security reason, you are not being able to save the code added in your child theme so please once add the code in your child theme via FTP .

    If issue still persist, please provide us with your FTP detail in below given email so that we can help you.

    email: support@wptravel.io

    Thank you.

    #24002
    tt74
    Participant

    Hi,

    I would like to remove gender and replace it with new fields, such as rooming choices.

    I have added the new fields using the Field editor plugin, however, the above code seems to have no effect on wp_travel_gender_traveller.

    Can you please advise.

    #24009
    wensolutions
    Keymaster

    Hello,

    Please add following given code in functions.php file of your child theme to remove the gender field from traveler info form.

    function wp_travel_remove_gender( $checkout_fields ){
    
    	unset( $checkout_fields['traveller_fields']['gender'] );
    	return $checkout_fields;
    }
    
    add_filter('wp_travel_checkout_fields', 'wp_travel_remove_gender' );

    Hope this helps.

    If you have any queries further, let us know.

    Thank you.

    #29134

    hi all!!
    For hide Date of Birth?

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘WP Travel Field Editor’ is closed to new topics and replies.