$field_description.=sprintf(__('. Extra Field Types are available in <a href="%s">Hobbyist or PRO versions</a>.','profile-builder'),esc_url('https://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wpbackend&utm_medium=clientsite&utm_content=manage-fields-link&utm_campaign=PBFree'));
array('type'=>'text','slug'=>'meta-name','title'=>__('Meta-name','profile-builder'),'default'=>wppb_get_meta_name(),'description'=>__('Use this in conjunction with WordPress functions to display the value in the page of your choosing<br/>Auto-completed but in some cases editable (in which case it must be unique)<br/>Changing this might take long in case of a very big user-count','profile-builder')),
array('type'=>'text','slug'=>'id','title'=>__('ID','profile-builder'),'default'=>wppb_get_unique_id(),'description'=>__("A unique, auto-generated ID for this particular field<br/>You can use this in conjuction with filters to target this element if needed<br/>Can't be edited",'profile-builder'),'readonly'=>true),
array('type'=>'textarea','slug'=>'description','title'=>__('Description','profile-builder'),'description'=>__('Enter a (detailed) description of the option for end users to read<br/>Optional','profile-builder')),
array('type'=>'text','slug'=>'row-count','title'=>__('Row Count','profile-builder'),'default'=>5,'description'=>__("Specify the number of rows for a 'Textarea' field<br/>If not specified, defaults to 5",'profile-builder')),
array('type'=>'text','slug'=>'allowed-image-extensions','title'=>__('Allowed Image Extensions','profile-builder'),'default'=>'.*','description'=>__('Specify the extension(s) you want to limit to upload<br/>Example: .ext1,.ext2,.ext3<br/>If not specified, defaults to: .jpg,.jpeg,.gif,.png (.*)','profile-builder')),
array('type'=>'text','slug'=>'allowed-upload-extensions','title'=>__('Allowed Upload Extensions','profile-builder'),'default'=>'.*','description'=>__('Specify the extension(s) you want to limit to upload<br/>Example: .ext1,.ext2,.ext3<br/>If not specified, defaults to all WordPress allowed file extensions (.*)','profile-builder')),
array('type'=>'text','slug'=>'avatar-size','title'=>__('Avatar Size','profile-builder'),'default'=>100,'description'=>__("Enter a value (between 20 and 200) for the size of the 'Avatar'<br/>If not specified, defaults to 100",'profile-builder')),
array('type'=>'text','slug'=>'date-format','title'=>__('Date-format','profile-builder'),'default'=>'mm/dd/yy','description'=>__('Specify the format of the date when using Datepicker<br/>Valid options: mm/dd/yy, mm/yy/dd, dd/yy/mm, dd/mm/yy, yy/dd/mm, yy/mm/dd, mm-dd-yy, yy-mm-dd, D, dd M yy, D, d M y, DD, dd-M-y, D, d M yy, @<br/>If not specified, defaults to mm/dd/yy','profile-builder')),
array('type'=>'textarea','slug'=>'terms-of-agreement','title'=>__('Terms of Agreement','profile-builder'),'description'=>__('Enter a detailed description of the temrs of agreement for the user to read.<br/>Links can be inserted by using standard HTML syntax: <a href="custom_url">custom_text</a>','profile-builder')),
array('type'=>'text','slug'=>'options','title'=>__('Options','profile-builder'),'description'=>__("Enter a comma separated list of values<br/>This can be anything, as it is hidden from the user, but should not contain special characters or apostrophes",'profile-builder')),
array('type'=>'text','slug'=>'labels','title'=>__('Labels','profile-builder'),'description'=>__("Enter a comma separated list of labels<br/>Visible for the user",'profile-builder')),
array('type'=>'text','slug'=>'public-key','title'=>__('Site Key','profile-builder'),'description'=>__('The site key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>','profile-builder')),
array('type'=>'text','slug'=>'private-key','title'=>__('Secret Key','profile-builder'),'description'=>__('The secret key from Google, <a href="http://www.google.com/recaptcha" target="_blank">www.google.com/recaptcha</a>','profile-builder')),
array('type'=>'checkbox','slug'=>'captcha-pb-forms','title'=>__('Display on PB forms','profile-builder'),'options'=>array('%'.__('PB Login','profile-builder').'%'.'pb_login','%'.__('PB Register','profile-builder').'%'.'pb_register','%'.__('PB Recover Password','profile-builder').'%'.'pb_recover_password'),'default'=>'pb_register','description'=>__("Select on which Profile Builder forms to display reCAPTCHA",'profile-builder')),
array('type'=>'checkbox','slug'=>'captcha-wp-forms','title'=>__('Display on default WP forms','profile-builder'),'options'=>array('%'.__('Default WP Login','profile-builder').'%'.'default_wp_login','%'.__('Default WP Register','profile-builder').'%'.'default_wp_register','%'.__('Default WP Recover Password','profile-builder').'%'.'default_wp_recover_password'),'default'=>'default_wp_register','description'=>__("Select on which default WP forms to display reCAPTCHA",'profile-builder')),
array('type'=>'checkbox','slug'=>'user-roles','title'=>__('User Roles','profile-builder'),'options'=>$user_roles,'description'=>__("Select which user roles to show to the user ( drag and drop to re-order )",'profile-builder')),
array('type'=>'text','slug'=>'user-roles-sort-order','title'=>__('User Roles Order','profile-builder'),'description'=>__("Save the user role order from the user roles checkboxes",'profile-builder')),
array('type'=>'text','slug'=>'default-value','title'=>__('Default Value','profile-builder'),'description'=>__("Default value of the field",'profile-builder')),
array('type'=>'text','slug'=>'default-option','title'=>__('Default Option','profile-builder'),'description'=>__("Specify the option which should be selected by default",'profile-builder')),
array('type'=>'text','slug'=>'default-options','title'=>__('Default Option(s)','profile-builder'),'description'=>__("Specify the option which should be checked by default<br/>If there are multiple values, separate them with a ',' (comma)",'profile-builder')),
array('type'=>'select','slug'=>'default-option-country','title'=>__('Default Option','profile-builder'),'values'=>(isset($default_country_values))?$default_country_values:'','options'=>(isset($default_country_options))?$default_country_options:'','description'=>__("Default option of the field",'profile-builder')),
array('type'=>'select','slug'=>'default-option-timezone','title'=>__('Default Option','profile-builder'),'options'=>wppb_timezone_select_options('back_end'),'description'=>__("Default option of the field",'profile-builder')),
array('type'=>'select','slug'=>'default-option-currency','title'=>__('Default Option','profile-builder'),'values'=>(isset($default_currency_values))?$default_currency_values:'','options'=>(isset($default_currency_options))?$default_currency_options:'','description'=>__("Default option of the field",'profile-builder')),
array('type'=>'select','slug'=>'show-currency-symbol','title'=>__('Show Currency Symbol','profile-builder'),'options'=>array('No','Yes'),'default'=>'No','description'=>__('Whether the currency symbol should be displayed after the currency name in the select option.','profile-builder')),
array('type'=>'select','slug'=>'cpt','title'=>__('Show Post Type','profile-builder'),'options'=>$post_types,'default'=>'post','description'=>__('Posts from what post type will be displayed in the select.','profile-builder')),
array('type'=>'text','slug'=>'validation-possible-values','title'=>__('Allowable Values','profile-builder'),'description'=>__("Enter a comma separated list of possible values. Upon registration if the value provided by the user does not match one of these values, the user will not be registered.",'profile-builder')),
array('type'=>'text','slug'=>'custom-error-message','title'=>__('Error Message','profile-builder'),'description'=>__("Set a custom error message that will be displayed to the user.",'profile-builder')),
array('type'=>'select','slug'=>'time-format','title'=>__('Time Format','profile-builder'),'options'=>array('%12 Hours%12','%24 Hours%24'),'description'=>__('Specify the time format.','profile-builder')),
array('type'=>'text','slug'=>'map-api-key','title'=>__('Google Maps API Key','profile-builder'),'description'=>__('Enter your Google Maps API key ( <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend" target="_blank">Get your API key</a> ). If more than one map fields are added to a form the API key from the first map displayed will be used.','profile-builder')),
array('type'=>'text','slug'=>'map-default-lat','title'=>__('Default Latitude','profile-builder'),'description'=>__("The latitude at which the map should be displayed when no pins are attached.",'profile-builder')),
array('type'=>'text','slug'=>'map-default-lng','title'=>__('Default Longitude','profile-builder'),'description'=>__("The longitude at which the map should be displayed when no pins are attached.",'profile-builder')),
array('type'=>'text','slug'=>'map-default-zoom','title'=>__('Default Zoom Level','profile-builder'),'description'=>__("Add a number from 0 to 19. The higher the number the higher the zoom.",'profile-builder'),'default'=>16),
array('type'=>'text','slug'=>'map-height','title'=>__('Map Height','profile-builder'),'description'=>__("The height of the map.",'profile-builder'),'default'=>400),
array('type'=>'textarea','slug'=>'default-content','title'=>__('Default Content','profile-builder'),'description'=>__("Default value of the textarea",'profile-builder')),
array('type'=>'textarea','slug'=>'html-content','title'=>__('HTML Content','profile-builder'),'description'=>__("Add your HTML (or text) content",'profile-builder')),
array('type'=>'text','slug'=>'phone-format','title'=>__('Phone Format','profile-builder'),'default'=>'(###) ###-####','description'=>__("You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.",'profile-builder').'<br>'.__("Eg. (###) ###-####",'profile-builder').'<br>'.__("Empty field won't check for correct phone number.",'profile-builder')),
array('type'=>'select','slug'=>'heading-tag','title'=>__('Heading Tag','profile-builder'),'options'=>array('%h1 - biggest size%h1','h2','h3','h4','h5','%h6 - smallest size%h6'),'default'=>'h4','description'=>__('Change heading field size on front-end forms','profile-builder')),
array('type'=>'text','slug'=>'min-number-value','title'=>__('Min Number Value','profile-builder'),'description'=>__("Min allowed number value (0 to allow only positive numbers)",'profile-builder').'<br>'.__("Leave it empty for no min value",'profile-builder')),
array('type'=>'text','slug'=>'max-number-value','title'=>__('Max Number Value','profile-builder'),'description'=>__("Max allowed number value (0 to allow only negative numbers)",'profile-builder').'<br>'.__("Leave it empty for no max value",'profile-builder')),
array('type'=>'text','slug'=>'number-step-value','title'=>__('Number Step Value','profile-builder'),'description'=>__("Step value 1 to allow only integers, 0.1 to allow integers and numbers with 1 decimal",'profile-builder').'<br>'.__("To allow multiple decimals use for eg. 0.01 (for 2 deciamls) and so on",'profile-builder').'<br>'.__("You can also use step value to specify the legal number intervals (eg. step value 2 will allow only -4, -2, 0, 2 and so on)",'profile-builder').'<br>'.__("Leave it empty for no restriction",'profile-builder')),
array('type'=>'select','slug'=>'required','title'=>__('Required','profile-builder'),'options'=>array('No','Yes'),'default'=>'No','description'=>__('Whether the field is required or not','profile-builder')),
array('type'=>'select','slug'=>'overwrite-existing','title'=>__('Overwrite Existing','profile-builder'),'options'=>array('No','Yes'),'default'=>'No','description'=>__("Selecting 'Yes' will add the field to the list, but will overwrite any other field in the database that has the same meta-name<br/>Use this at your own risk",'profile-builder')),
$prepopulated_fields[]=array('field'=>'Default - Name (Heading)','field-title'=>__('Name','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'1','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Username','field-title'=>__('Username','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'2','description'=>__('Usernames cannot be changed.','profile-builder'),'row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'Yes');
$prepopulated_fields[]=array('field'=>'Default - First Name','field-title'=>__('First Name','profile-builder'),'meta-name'=>'first_name','overwrite-existing'=>'No','id'=>'3','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Last Name','field-title'=>__('Last Name','profile-builder'),'meta-name'=>'last_name','overwrite-existing'=>'No','id'=>'4','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Display name publicly as','field-title'=>__('Display name publicly as','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'6','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Contact Info (Heading)','field-title'=>__('Contact Info','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'7','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Jabber / Google Talk','field-title'=>__('Jabber / Google Talk','profile-builder'),'meta-name'=>'jabber','overwrite-existing'=>'No','id'=>'12','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - About Yourself (Heading)','field-title'=>__('About Yourself','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'13','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Biographical Info','field-title'=>__('Biographical Info','profile-builder'),'meta-name'=>'description','overwrite-existing'=>'No','id'=>'14','description'=>__('Share a little biographical information to fill out your profile. This may be shown publicly.','profile-builder'),'row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','required'=>'No');
$prepopulated_fields[]=array('field'=>'Default - Password','field-title'=>__('Password','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'15','description'=>__('Type your password.','profile-builder'),'row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'Yes');
$prepopulated_fields[]=array('field'=>'Default - Repeat Password','field-title'=>__('Repeat Password','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'16','description'=>__('Type your password again. ','profile-builder'),'row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'Yes');
if(wppb_can_users_signup_blog()){
$prepopulated_fields[]=array('field'=>'Default - Blog Details','field-title'=>__('Blog Details','profile-builder'),'meta-name'=>'','overwrite-existing'=>'No','id'=>'17','description'=>'','row-count'=>'5','allowed-image-extensions'=>'.*','allowed-upload-extensions'=>'.*','avatar-size'=>'100','date-format'=>'mm/dd/yy','terms-of-agreement'=>'','options'=>'','labels'=>'','public-key'=>'','private-key'=>'','default-value'=>'','default-option'=>'','default-options'=>'','default-content'=>'','required'=>'No');
$message.=sprintf(__("The following option did not coincide with the ones in the options list: %s\n",'profile-builder'),$posted_values['default-option']);
}
// END check for valid default option (checkbox, select, radio)
// check to see if any user role is selected (user-role field)
_e("If you're interested in displaying different fields in the registration and edit profile forms, please use the Multiple Registration & Edit Profile Forms Modules.",'profile-builder');
else
_e("With Profile Builder Pro v2 you can display different fields in the registration and edit profile forms, using the Multiple Registration & Edit Profile Forms module.","profile-builder")
$results=$wpdb->get_results("SELECT meta_value, meta_key FROM {$wpdb->usermeta} WHERE user_id={$user_id} AND meta_key LIKE '%{$meta_name_underlined}%'",ARRAY_N);