“Bitte w?hlen Sie das Land/die Region, von dem/der aus Sie am Projekt teilnehmen.” as required
yes it’s required but isn’t working at the time of registration na.. that is issue..
Can you show us the shortcode also?
SURE..
function my_countries_func() {
$country_post = (new WP_Query(['post_type' => 'all_country', 'post_status' => 'publish', 'order' => 'ASC', 'posts_per_page' => -1]));
$options = '';
if ( $country_post->have_posts() ):
while ( $country_post->have_posts() ) : $country_post->the_post();
$options .='<option value="'.get_the_id().'">'.get_the_title().'</option>';
endwhile;
endif;
$html = '<div class="um-field-label"><label for="um-field-shortcode">'.__( 'Bitte w?hlen Sie das Land/die Region, von dem/der aus Sie am Projekt teilnehmen.*', 'ultimate-member' ).'</label></div> ';
$html .= '<div class="um-field-area">
<select class="um-form-field js-states valid form-control" name="teacher_country" id="my_country" onclick="get_all_city(this.value)" required>
<option value= " ">Bitte w?hlen Sie ein Land</option>
'.$options.'
<option value="new_country" id="other_country">Anderes Land</option>
</select>
</div>';
return $html;
}
add_shortcode( 'my_countries', 'my_countries_func' );