Placeholder text is missing

Home Forums BP Profile Search Forum Placeholder text is missing

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #11163 Reply

    For the profile search form I used on Elementor is not showing the default value or any placeholder text in the drop downs.

    There is an additional ‘option’ set without any value and that is being selected as default. (so it shows as blank)

    How do I fix this?

    Plugins I have:
    BuddyBuilder Pro
    Elementor Pro

    Theme is KLEO
    However, even in the default theme the issue is still there.

    Please help me out

    #11164 Reply

    Hi Gautham,

    To add a placeholder to a drop-down field, place this code in your bp-custom.php or functions.php file:

    add_action ('bps_field_before_search_form', 'set_placeholder');
    function set_placeholder ($f)
    	if ($f->code == 'field_35' && $f->display == 'selectbox')
    		$f->options[''] = 'select a value...';

    Replace 35 with the actual field ID of your profile field.

    If you wish to force a default value instead, please have a look at:

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Placeholder text is missing
Your information: