Conditionally disable button
I am trying to make a button disable when the status field is Completed, I found this tread :
viewtopic.php?f=1&t=403
and here is my code:
function ButtonDisable() {
if (fd.field('Satus').value() == 'Completed') {
$('.approve-button').prop('disabled', true);
} else {
$('.approve-button').prop('disabled', false);
}
}
fd.field('Satus').change(ButtonDisable);
ButtonDisable();
but it is not working L
viewtopic.php?f=1&t=403
and here is my code:
function ButtonDisable() {
if (fd.field('Satus').value() == 'Completed') {
$('.approve-button').prop('disabled', true);
} else {
$('.approve-button').prop('disabled', false);
}
}
fd.field('Satus').change(ButtonDisable);
ButtonDisable();
but it is not working L
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
Hi, use this code
function ButtonDisable() {
$('.approve-button').prop('disabled',
(fd.field('Title').value() != 'Completed'));
}
fd.field('Title').change(ButtonDisable);
ButtonDisable();
function ButtonDisable() {
$('.approve-button').prop('disabled',
(fd.field('Title').value() != 'Completed'));
}
fd.field('Title').change(ButtonDisable);
ButtonDisable();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests