Different confirmation fields to different services?

I use the plugin for two services on my site. Is there any way to customise the confirmation independently for the two services? I need a custom field for just one service, but it has to be filled. Can I add it to it, or exclude it from the other?

  • Jose

    Hi @Imre,

    Sorry for the huge delay on my response. I hope you are doing great today.

    There is no out-of-the-box feature to achieve what you want.
    I coded this work around for you. You can place it in the footer template in your theme or in your custom plugin using the wp_enqueue_script method.

    <script type="text/javascript">
        jQuery(function($) {
            var SERVICES_ENABLED = [1,3,7];//Populate with the IDs of the services for which you want to show the custom field.
            function toggleCustomField(){
                var currentService = parseInt($('.app_select_services').val());
                if(SERVICES_ENABLED.indexOf(currentService) == -1){
                    var customFieldElement = $('.appointments-dummyfield-field');//replace the selector .appointments-dummyfield-field to match the class name in your html.
                    customFieldElement.find('input').attr('value','Default Value');//replace 'Default Value' with anything you like.
                    customFieldElement.css('display', 'none');

    Basically, this snippet is just detecting if the Service should render the field or not. If not, it is populating the custom field with a default value and hiding it using CSS.

    Please give it a try and let me know.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.