• Resolved durabo

    (@durabo)


    Hi,
    I have a set of time slots with a maximum of 30 slots.
    The problem is that the user can only book 2 items (person) for each time. How can I limit the “Booking items count” drop down menu?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter durabo

    (@durabo)

    Hi solved it by adding this css:

    #wbk-book-quantity option:not([value=”1″]):not([value=”2″]){
    display: none !important;
    }

    Plugin Author WebbaPlugins

    (@webba-agency)

    Hi,

    Thank you for sharing your solution, but it may not work on certain iOS devices. I would recommend using the following custom JavaScript code:

    function wbk_on_form_rendered( service ){
        jQuery('#wbk-book-quantity').find('option').remove();
        jQuery('#wbk-book-quantity').html('<option value="1">1</option><option value="2">2</option>');
    }

    If your theme doesn’t support custom javascript, you can add this code using plugin Simple Custom CSS and JS

    If you have any question, feel free to contact us.

    • This reply was modified 3 years, 6 months ago by WebbaPlugins.
    Thread Starter durabo

    (@durabo)

    Many many thanks

    Thread Starter durabo

    (@durabo)

    What if I only need to block a particular service?

    I have 3 services. On two I have to block the items to max 2, while on one service I have to block the items to max 1.

    • This reply was modified 3 years, 2 months ago by durabo.
    Plugin Author WebbaPlugins

    (@webba-agency)

    You need to update the custom code, so there will be different behavior depending on the service ID.

    In the following example, it allows 2 places for the service with the ID 1, and 1 place for the service with the ID 1:

    function wbk_on_form_rendered( service ){
        jQuery('#wbk-book-quantity').find('option').remove();
        if( serrvice == 1 ){
            jQuery('#wbk-book-quantity').html('<option value="1">1</option><option value="2">2</option>');
        }
        if( serrvice == 2 ){
            jQuery('#wbk-book-quantity').html('<option value="1">1</option>');
        }
    }
    Thread Starter durabo

    (@durabo)

    Good!!! Many thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Limit booking items count’ is closed to new replies.