cancel
Showing results for 
Search instead for 
Did you mean: 

HIdidng input field depeding on radio button selected

Former Member
0 Kudos

Hello Experts,

Can any let me know or point to a tutorial ?

how I can hide a input field another input field depending on the selected radio button.

The radio button I have are fax and email.

If Fax is selected I want to dispaly input field for fax and vice versa.

Thanks,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

Refer the below link, it will help you

[Setting visibility on UI Elements|;

Raja T

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for your replies.

All this code has to be written in modifyview function of view right?

Former Member
0 Kudos

Hi Raj,

Your requirement depends upon the action of the radio button.

So create an action for the radio button and paste the code there.

Thanks,

Namrta Mahajan

Former Member
0 Kudos

No.

Armin

former_member485701
Active Participant
0 Kudos

Hi raj,

(1)Create two context attribute of type "Visibility".

(a) faxVisible

(b) emailVisible

(2)And bind the "visible" property of inputfields to these attributes.

(3)On radio button selection in the action handler do following thing for fax selection and vice versa.

wdContext.currentContextElement().setFaxVisible(WDVisibility.VISIBLE);

wdContext.currentContextElement().setEmailVisible(WDVisibility.NONE);

Regards,

Praveen

Former Member
0 Kudos
Former Member
0 Kudos

create context varriabel type = com.sap.ide.webdynpro.uielementdefinitions.Visibility

on inputfield property Visibility -> set context varriable

on radio button onSelect event

set context varrible = WDVisibility.VISIBLE or WDVisibility.NONE

rahul