Hi All,
I'm trying to set a date picker custom field to be required if certain value in another custom field (radio buttons) was chosen.
Tried with no success:
def InstallDate = getFieldByName("Installation Date")
def InstallStatus = getFieldById(getFieldChanged())
def selectedOption = InstallStatus.getValue() as String
def isInstallSelected = selectedOption == "Certain Value"
InstallDate.setHidden(! isInstallSelected)
InstallDate.setRequired(isInstallSelected)And:
def installStatusRadioButtons = getFieldByName("Installation Status")
def installDatePicker = getFieldByName(getFieldChanged())
def installStatusRadioButtonsValue = installStatusRadioButtons.getValue()
if(installStatusRadioButtonsValue == "Certain Value"){
formField.setRequired(true)}Also I'll be glad for some clarification what should I use:
| Fields |
| Initialiser Function |
Or
Add Field |
| Add one or more fields to this Behaviour. |
Maybe configure some general settings in a certain way?
Thank you in advance!