BP Profile Search › Placeholder text is missing
-
AuthorPost
-
Gautham
GuestFor 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:
BuddyPress
BuddyBuilder
BuddyBuilder Pro
Elementor
Elementor ProTheme is KLEO
However, even in the default theme the issue is still there.Please help me out
andrea
Plugin AuthorHi 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:
-
AuthorPost