Silly Java Question
- dominique.beaudin
- Posts: 49
- Joined: Tue Mar 06, 2018
Hello,
I followed the instructions to do a conditional Show/hide required/not for a drop down- it works great, but I have 4 different values in the drop down and each need to have different items be visible when they are selected.
I am not a Java expert, but my attempt to use else if statements failed completely.
Any help is appreciated!
function checktype(){
if(fd.field('Reason_x0020_For_x0020_Invoice_x').value()=='Contractor got GW Coverage under Carrier'){
$('.number-hide').show();
$('.number-hide').FieldRequired(true);
$('.related-equipment').hide();
}
else{
//fd.field('Reason_x0020_For_x0020_Invoice_x').value('Item Adjustment for Equipment'); - this on should show related-equipment
$('.number-hide').hide();
$('.number-hide').titleRequired(True);
$('.related-equipment').hide();
}
I followed the instructions to do a conditional Show/hide required/not for a drop down- it works great, but I have 4 different values in the drop down and each need to have different items be visible when they are selected.
I am not a Java expert, but my attempt to use else if statements failed completely.
Any help is appreciated!
function checktype(){
if(fd.field('Reason_x0020_For_x0020_Invoice_x').value()=='Contractor got GW Coverage under Carrier'){
$('.number-hide').show();
$('.number-hide').FieldRequired(true);
$('.related-equipment').hide();
}
else{
//fd.field('Reason_x0020_For_x0020_Invoice_x').value('Item Adjustment for Equipment'); - this on should show related-equipment
$('.number-hide').hide();
$('.number-hide').titleRequired(True);
$('.related-equipment').hide();
}
- dominique.beaudin
- Posts: 49
- Joined: Tue Mar 06, 2018
Thank you, I will correct that. I am concluding that else if statements are not supported? thanks
Hi!
No, "else if" statements are fully supported: https://developer.mozilla.org/en-US/doc ... /if...else
No, "else if" statements are fully supported: https://developer.mozilla.org/en-US/doc ... /if...else
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests