Hi dudes,
I have a dynamic page and on that page I want to show a download button. With the download button you can download a file from a dataset (user generated content). So fare there is no problem.
Now my problem: I only want to enable the button when there is content available.
I’m a bit frustrated. Maybe someone can help me. Thanks in advance.
This is my not working code so fare:
$w ( “#dynamicDataset” ). onReady ( () => {
$w ( ‘#lebenslauf’ ). value = $w ( “#dynamicDataset” ). getCurrentItem (). fieldName ;
if ( $w ( ‘#lebenslauf’ ). value === ‘’ ) {
$w ( ‘#button1’ ). disable ();
}
else {
$w ( ‘#button1’ ). enable ();
}
})
FieldName can not be found. But it is in the data collection