cancel
Showing results for 
Search instead for 
Did you mean: 

making one radio button invisible if selected no in other one

Former Member
0 Kudos

Hello, I have two radio buttons, RadioButtonGroupByKey5 and RadioButtonGroupByKey6, both with "Yes" and "No" Enumerations. RadioButtonGroupByKey6 is invisible. Now, I would like to have in case of pressing "No" in RadioButtonGroupByKey5, RadioButtonGroupByKey6 going to be visible and usable. If "Yes" in RadioButtonGroupByKey5 then RadioButtonGroupByKey6 will be still invisible. Any advice, piece of Java code will be welcome. I tried to bound them in such way, wont work ofc:

class visible(IWDAttributeInfo attribInf, ISimpleType simpleType, IWDComponent component,String value, String id, String number, WDMessageType type, String message,  IWDNodeElement invalidContextElement)
	{
						  
IWDAttributeInfo attribInf = wdContext.getNodeInfo().getAttribute("RadioButtonGroupByKey5");
		ISimpleType simpleType = attribInf.getSimpleType();
		Set set = simpleType.getEnumeration();
		String value = "No";
		if(set != null)
		{
			if(set.contains(No))
			{
						//wdComponentAPI.getMessageManager().reportSuccess("ok");
	WDContext.currentContextElement().setRadioButtonGroupByKey6(WDVISIBILTY.VISBILE);

			}
			}
   }

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

by invisible I meant: enabled: false

and visible: enable: true