Load CMS items to Select form field

PHOTO EMBED

Wed Aug 25 2021 10:13:15 GMT+0000 (UTC)

Saved by @MariusDT

<! –– Load locations and departments from CMS in the select field ––>
<script>

$('.select-location').each(function(){
	var location = $(this).text();
	$('#locations').append('<option value="'+location+'">'+location+'</option>');
  })
  
$('.select-department').each(function(){
	var location = $(this).text();
	$('#departments').append('<option value="'+location+'">'+location+'</option>');
  })
content_copyCOPY