Struggling with a dropdown menu in a form. What I have is a plugin for Wordpress to make extra fields in an excisting form.
The problem that the menu is not filling with values and what ever I do nothing good is happening.
Could someone please help to get on the right track?
Greetz Arend
The code I am using;
function gma_wpjmef_frontend_add_doelgroep_info_field( $fields ) {
$fields['job']['job_doelgroep_info'] = array(
'label' => __( 'Select One ', 'extra-field' ),
'type' => 'select',
'required' => false,
'placeholder' => '',
'omschrijving' => '',
'priority' => '8',
'be' => 'Belgium',
'lu' => 'Luxembourgh',
'nl' => 'Netherlands' ,
);
foreach ($fields['job']['job_doelgroep_info'] as $key => $value) {
echo ' <option value="<echo $value; >"<<echo $key;></option>';
};
return $fields;
}