• Resolved timprys

    (@timprys)


    Is it possible for the select option of party size to return an empty value first? That way it can be prevented that the form is sent without first entering the pary size.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi Tim,

    If you’re comfortable doing a bit of coding, we provide a filter that lets you change the output of the Party dropdown in the booking form.

    The filter is rtb_form_party_options and an example of how to use it would be:

    add_filter('rtb_form_party_options', 'change_party_size_options');
    
    function change_party_size_options( $options ) {
    
        $options = array(
            '' => '',
            '1' => '1',
            '2' => '2',
            '3' => '3',
            '4' => '4',
            '5' => '5',
            '6' => '6',
            '7' => '7',
            '8' => '8',
            '9' => '9',
            '10' => '10',
        );
    
        return $options;
    }

    That would change the output of the dropdown to show a blank value at the top and then also options from 1 to 10. You could add or remove entries in the array to cover what you want as the minimum and maximum.

    You would put this function in your theme’s functions.php file or somewhere similar.

    • This reply was modified 2 years, 11 months ago by jaysupport.
    Thread Starter timprys

    (@timprys)

    Great! You guys made my day. Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘select option of party size to return an empty first value’ is closed to new replies.