_bp_ps_field_select( $groups,  $name,  $id,  $value )

Output BuddyBoss Profile Search select field.

Description

Source

File: bp-core/profile-search/bps-admin.php

function _bp_ps_field_select ($groups, $name, $id, $value)
{
	echo "<select class='bp_ps_col2 existing' name='$name' id='$id'>\n";
	foreach ($groups as $group => $fields)
	{
		$group = esc_attr ($group);
		echo "<optgroup label='$group'>\n";
		foreach ($fields as $field)
		{
			$selected = $field['id'] == $value? " selected='selected'": '';
			echo "<option value='$field[id]'$selected>$field[name]</option>\n";
		}
		echo "</optgroup>\n";
	}
	echo "</select>\n";
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.