Skip to Content
author's profile photo Former Member
Former Member

Enabling InputFields through Radiobuttons

Hi,

I want to make an application in which there are three RadioButtons through RadioButtongroupBykey and one InputFields. On selecting the third radiobutton, the inputfield will be enable.

Please provide me the code for the same.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 08:44 AM

    Hi Manish,

    --In the view create a RadioButtonsgroupByKey and an input field.

    --Create a context attribute of type boolean and bound that to the enable property of the input field., say "enable_context"

    --Now we need to set the value of "enable_context" based on the selection of the radiobutton.

    --For this we need to create an Eventhanler , So create the action and pass the key value as parameter.

    --Do parameter mapping in the method wdmodifyview()

    --Inside the eventhandler now write your logic to set the value of "enable_context"

    Best Wishes

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 07:13 AM

    Hi,

    create an attribute of type boolean and set it to false bind this to the enabled property of the text box.

    use the action parameter key to find the selected key. IF that matches your third one make the enabled property of the text box to true.

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 07:13 AM

    Hi Manish

    1)Set the keyToSelect =button_3 for Radio Button 3

    2)Create a context value attribute of type String say <b>ButtonEnable</b> and bind that to the <b>selectedKey</b> property of Radio Button3.

    3)Create a Boolean Value Attribute say "<b>EnableInputUI</b>" and bind that to the <b>Enable</b> property of InputField

    onSelect() // radio Button 3

    if(wdContext.currentContextElement().getButtonEnable().equals("button_3"));

    wdContext.currentContextElement.setEnableInputUI(true);

    Best Regards

    Chaitanya.A

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.