Good day all;
I am trying to figure out how to use a button instead of a checkbox to make a sub-form visible and when clicked again the sub-form will be hidden.
I have tried using an “if” statement but I do not seem to be able to get the logic right.
Any help would be appreciated.
The Chomp
Solved! Go to Solution.
Views
Replies
Total Likes
Got it working......
This is what I did. If there is a better way of doing this, please let me know.
if (approval_note_subform.presence == "hidden") {
approval_note_subform.presence = "visible";
}
else if (approval_note_subform.presence == "visible") {
approval_note_subform.presence = "hidden";
}
Views
Replies
Total Likes
Got it working......
This is what I did. If there is a better way of doing this, please let me know.
if (approval_note_subform.presence == "hidden") {
approval_note_subform.presence = "visible";
}
else if (approval_note_subform.presence == "visible") {
approval_note_subform.presence = "hidden";
}
Views
Replies
Total Likes
Hi,
Perfect way to do it. Only small suggestion would be that because the subform can only be visible OR hidden, you can drop the else if part:
if (approval_note_subform.presence == "hidden") {
approval_note_subform.presence = "visible";
}
else {
approval_note_subform.presence = "hidden";
}
Good luck,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies