# profile-builder/2.0.3/assets/lib/wck-api/fields/country select.php

User Profile Builder – Beautiful User Registration Forms, User Profiles &amp; User Role Editor, version 2.0.3. 21 lines.

- Page: https://pluginprobe.com/plugins/profile-builder/2.0.3/code/assets/lib/wck-api/fields/country%20select.php
- Raw: https://pluginprobe.com/plugins/profile-builder/2.0.3/raw/assets/lib/wck-api/fields/country%20select.php
- Modified: 2014-10-21T13:22:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/profile-builder/2.0.3/code/assets/lib/wck-api/fields/country%20select.php#L10-L20`.

```php
<?php 
/* @param string $meta Meta name.	 
 * @param array $details Contains the details for the field.	 
 * @param string $value Contains input value;
 * @param string $context Context where the function is used. Depending on it some actions are preformed.;
 * @return string $element input element html string. */
 
require_once( plugin_dir_path(__FILE__) . '../assets/country/country-select.php' );
$country_list = apply_filters( 'wck-country-list', wck_country_list() );
$element .= '<select name="'. esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'"  id="';
if( !empty( $frontend_prefix ) )
	$element .=	$frontend_prefix;  
$element .= esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-country-select mb-field" >';
$element .= '<option value="">'. __('...Chose', 'wck') .'</option>';						
if( !empty( $country_list ) ){					
	foreach( $country_list as $option ){							
		$element .= '<option value="'. esc_attr( $option ) .'"  '. selected( $option, $value, false ) .' >'. esc_html( $option ) .'</option>';					
	}
}			
$element .= '</select>';		
?>
```
