I’m very new to corvid and am having a problem.
I want a button and a box to appear if a value in a radiobutton group has been checked.
If it is not checked (ie the other one is, I want a different button to appear).
I have ensured that I have entered the datavalue not the data label and reproduce my code below but it doesn’t work.
Any help very gratefully received.
You need to add paranthesis:
.show ();
1 Like
Hi, knight.maidstone.
To add to what J.D. said, show is a method and, as a result, you need to include a set of parentheses after it. Conversely, value is property and, as a result, you do NOT include parentheses after it.
So, remember:
- No parentheses after a property name
- Parentheses after a method name
Hi, knight.maidstone.
In addition, you may have a misspelling in your 2nd condition; if that’s the case, then the 1st condition is duplicated and you could consolidate your code down to the following:
if ($w('#Paying').value === 'someoneElse') {
$w('#GoToPayment').show();
$w('#Who').show();
} else {
$w('#SubmitForm').show();
}
I also employed camelCase notation in your string to make it easier to read; you would, of course, have to adjust your string elsewhere in your code.