Hi there i have been trying to get a disabling enableing functionality on my own for people who submit diff links. i used some coding but nothing happens and nothing seems to work…
So i need a little bit of help and if needed i will pay for the service…
Its just that i have little money to spend and cant find the solution here on the forums…
$w.onReady( () => { $w(“#myDataset”).onReady( () => { $w(’ #text125 ‘).value = $w(“#myDataset”).getCurrentItem().fieldName; if ($w(’ #text125 ‘).value === ‘Yes’) { $w(’ #button28 ‘).enable(); } else { $w(’ #button28 ').disable(); } });
I have been trying with this code but i must missing sometin…
any help is appriciated…
All i want is to disable the buttons that dont have a link… thats all…
Please help.
my website: www.beatzs.net contact me or here in this forum if i can find it back. haahha
Well i think i found your own post (i answered you in another old post).
Ok, what we have here?
First of all to say → with such a CHAOTIC CODE-FORMAT you always will get errors and issues.
First let us to use the right CODING-FORMAT to bring more structure into it…
$w.onReady( () => {
$w("#myDataset").onReady(() => {
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
if ($w('#text125').value === 'Yes') { $w('#button28').enable();}
else{ $w('#button28').disable(); }
});
});
Ok, this one already looks much better.
Ok, now doing some ANALYSIS and invastigating the code… (green=good)
$w.onReady(()=>{
$w("#myDataset").onReady(()=>{
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
if ($w('#text125').value === 'Yes') { $w('#button28').enable();}
else{ $w('#button28').disable(); }
});
});
Is this our bug?
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
Let’s see…
A TEXT-element has no —> VLAUE (it has just txt or html)
And what are you trying to do here?
First getting some results out of DB and putting them into a text and then doing an if-else-query to get another end-function?
Perhaps you wanted to do this one…
let myData = $w("#myDataset").getCurrentItem().fieldName; console.log(myData)
if (myData === 'Yes') {$w('#button28').enable();}
else{ $w('#button28').disable(); }