xxxxxxxxxx
//add in this text as placeholder in select field with |
// This field is required to work
Please Select Option |
<script>
document.addEventListener('DOMContentLoaded', () => {
// Find all forms with class name "dd-ele-form"
const forms = document.querySelectorAll('.dd-ele-form');
forms.forEach(form => {
const selects = form.querySelectorAll('select[required]');
selects.forEach(select => {
if (select.options.length > 0 && select.options[0].value.trim() === '') {
select.options[0].disabled = true;
// Optionally add CSS for better UX:
select.options[0].style.display = 'none';
}
});
});
});
</script>
xxxxxxxxxx
fetch(
"https://api.igdb.com/v4/collections",
{ method: 'POST',
headers: {
'Accept': 'application/json',
'Client-ID': 'Client ID',
'Authorization': 'Bearer access_token',
},
body: "fields as_child_relations,as_parent_relations,checksum,created_at,games,name,slug,type,updated_at,url;"
})
.then(response => {
console.log(response.json());
})
.catch(err => {
console.error(err);
});