• Resolved fabio88b

    (@fabio88b)


    Hello, I’ve purchased a theme that includes your plugin, and I’m really appreciating it,
    I just have a couple of problems I’d like to solve:

    – How can I customize placeholder text colour with CSS? I’ve changed user input text color using custom css, but placeholder labels are grey and I can’t find a way to change it.

    – Is that possible to add the word “people” in the “rtb-select party” field? I’d like to have “1 person”, “2 people”, “3 people”, etc. instead of just the number.

    Thanks a lot!

    https://ww.wp.xz.cn/plugins/restaurant-reservations/

Viewing 1 replies (of 1 total)
  • Hi fabio88b,

    My plugin doesn’t actually use placeholder text. If your booking form has placeholder text, it’s probably because the theme has overridden the default booking form with their own. They should be able to help you figure out how to change this in their theme.

    To change the labels of options in the party field, you’ll need to hook into the rtb_form_party_options filter. That code will look something like this:

    add_filter( 'rtb_form_party_options', 'rtb_add_label_to_party_options' );
    function rtb_add_label_to_party_options( $options ) {
    
    	for ( $i = 0; $i < count( $options ); $i++ ) {
    		if ( !$i ) {
    			$options[$i] += ' person';
    		} else {
    			$options[$i] += ' people';
    		}
    	}
    
    	return $options;
    }

    I have not tested this code so you may need to play around with it a bit. But if you dump it into your theme’s functions.php file or wrap it in a little plugin it should work for you.

Viewing 1 replies (of 1 total)

The topic ‘Editing Form’ is closed to new replies.