• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Greying out check boxes depending on radio button selection.

Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Hello


I posted something similar earlier but the layout has now changed.

 

A customer is given this booking form and this is the last page of the booking form where the customer selects any additional services they want.

Sometimes these services are not available. So we have made an office use only section at the bottom where they tick yes or no for availability.

 

For example, if the child care service is unavailable. Then the staff will tick no in the office use only section. This will then make the child care box read only and greyed out.

 

My question is how can this be done?

 

The name for the child care checkbox in the additional services section is called additionalChildCare

and the  name of the child care radio button in the office only section is officeChildCare.

Screenshot 2023-01-24 at 11.37.53.png

TOPICS
How to , JavaScript

Views

347

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 24, 2023 Jan 24, 2023

As Mouse UP action of "officeChildCare" add this script:

var check = this.getField("additionalChildCare");
check.readonly = event.target.value == "Off" ? false : true;
check.fillColor = event.target.value == "Off" ? color.white : ["G", 0.8];

Votes

Translate

Translate
Community Expert ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

As Mouse UP action of "officeChildCare" add this script:

var check = this.getField("additionalChildCare");
check.readonly = event.target.value == "Off" ? false : true;
check.fillColor = event.target.value == "Off" ? color.white : ["G", 0.8];

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

LATEST

Thank you

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines