[Appointments + ] additional fields

There is an option for additional fields. I want to:

1) I only want it to appear in one service. How can I make it this happen?

2) I created a custom field called “package”, but when I add a dollar sign in front of the text, it doesn’t return any data on the confirmation email.

  • Nithin
    • Support Wizard

    Hi Manjeet Singh,

    We got an update regarding this from the SLS team, for the 1st query, please add the following code:

    <?php

    //exclude specific additional field for special page
    add_action( 'template_redirect', function(){
    $page_slug = 'model-photoshoot-appointment-booking';
    if( is_page($page_slug) ){
    add_filter( 'option_appointments_options', function( $options ){
    if( ! empty( $options['additional_fields'] ) ){
    $exclude_fields = array('Package');
    foreach( $options['additional_fields'] as $key => $field ){
    if( in_array( $field['label'], $exclude_fields ) ){
    unset( $options['additional_fields'][ $key ] );
    }
    }
    }

    return $options;
    } );
    }
    });

    2) I created a custom field called “package”, but when I add a dollar sign in front of the text, it doesn’t return any data on the confirmation email.

    For the 2nd query, the following code should help:

    add_filter( 'app-additional_fields-field_value', function( $value ){
    $value = str_replace('$', '$', $value);

    return $value;
    });

    You can add the above code via mu-plugins as mentioned in this documentation:

    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Kind Regards,

    Nithin

  • Nithin
    • Support Wizard

    Hi Manjeet Singh,

    Sorry for the delay in getting back to you. We reply to tickets based on queue order, and hence the delay.

    The code given in the 2nd query does work fine when tested in my system when tested and shows the package as $200 etc. I tested on your website, and I could notice the following:

    The dollar sign is missing, other than that the value does show up. Maybe there is a conflict with some other code on the website side. Could you please send us your websites FTP, or cpanel credentials so that I could check the code added, and test further.

    You can send credentials by using our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    – To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas

    -FTP or cPanel credentials (host/username/password)

    -link back to this thread for reference

    -any other relevant URLs

    Please do follow up in the ticket once you have sent the above credentials. Have a great weekend.

    Kind Regards,

    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.