How to detect which radio button is selected in Forms?

I created a Form with two radio buttons, one for Male and one for Female.
I created a Push Button with WHEN-BUTTON-PRESSED to display the selected radio button as a DIsplay Item on the same Form.
Can any one give me some hints?
(0) Male
( ) Female
[Submit]
When the [Submit] button is pressed, I would like to display:
You are a man. (if Radio button selected is Male)
You are a woman (if Radio button selected is Female)

create item RG with property record group in block2
add two button in this group (rg1 and rg2)
assign value to above two buttons
rg1 M (Male)
rg2 F (Female)
assign initial value to RG Say M
You can use this item as :block2.RG in Save Button.

Similar Messages

  • Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Yes, one needs to use some custom JavaScript code to control the other fields' properties.
    Disabling (graying-out) Form Fields by Thom Parker

  • Determining which radio button is selected

    In my WHEN-RADIO-CHANGED trigger I would like to evaluate which radio button (choice of two) is selected.
    I presumed it would be quite simple to do (as it is in VB - ill risk mentioning those imortal letters), however I can't find any mention of such a procedure in the help files.
    And the get_property procedure doesn't have a property for "selected".
    Any body have any ideas about the best way to check which is selected?
    Regards,

    the value is set in the forms builder (at design time) for each radio-button. Property: [Functional]-[Radio Button Value)
    you get the actual value (only at runtime) of the radio-button-group and not from the radio-buttons. :BLOCKNAME.ITEMNAME
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to uncheck all radio buttons in WHEN-NEW-FORM-INSTANCE trigger

    Hi,
    I have one radio group(RDBTNGRP) having three radio buttons (RDBTN1,RDBTN2,RDBTN3) in a control block, i want to uncheck all these three buttons through code.
    Any help please.
    Regards,

    Hello,
    I don't think you can achieve using the code or property to unselect all radio buttons.
    One possibility is there to create one extra radio button in that same group and set any value for that. Let say you have two radio buttons in the radio group and now you created one more radio button in the same group. And set the value like ABC. Now go to the property of new created radio button and set the X Position, Y Position, Width and Height to zero (0). And set the initial value for that radio group to ABC (new created radio button). So at runtime it will look like unselected all radio buttons. And while saving you can check if radio button selected on your criteria or not.
    -Ammad

  • How do I create radio buttons which hide certain fields when selected?

    I have a set of two radio buttons, "Yes" and "No"
    When the "Yes" radio button is selected, I would like the "Bank Name", "Branch Number", "Institution Number" and the "Account Number" field to all be blocked from entering content into them.
    When the "No" button is selected, I would like for all of these fields to be available to be written in.
    I can do this currently with check boxes, but the problem with those is that both boxes can be checked at the same time, which is problematic.
    How can I make it so that the radio buttons control whether or not the fields can be written in!
    Thanks very much!

    Yes, I have done this. The buttons are mutually exclusive. The are in the group "Vendor EFT" - one is named "Yes", one is named "No".
    When the "Yes" radio button is selected, I would like the "Bank Name", "Branch Number", "Institution Number" and the "Account Number" field to all be blocked from entering content into them.
    When the "No" button is selected, I would like for all of these fields to be available to be written in.
    Not sure what code needs to be written for this.

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • How do I tell if a radio button is selected?

    Apart from relying on the radiohandler, is there any direct command or code which i can use to immediately check if a particular radio button is selected or not?
    Like in Visual Basic, we can immediate state if (radiobutton.value = false)
    is there any equivalent to this in java?

    The radio button inherits from abstractButton class.
    I believe in the abstractButton has isSelected method.
    You can use this to get the state of the button.

  • How to set a radio button to be selected?

    I'm trying to find out how to do something that should be seemingly simple. That is to create a little function that selects a random radio button as selected. I have 3 radio buttons in a group (see code):
    </mx:ApplicationControlBar>
    <mx:RadioButtonGroup id="radiogroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" groupName="radiogroupZ"/>
    <mx:RadioButton x="10" y="634" label="Button 2" groupName="radiogroupZ"/>
    <mx:RadioButton x="10" y="660" label="Button 3" groupName="radiogroupZ"/>
    I've tried all kinds of code to try to set Button 1, 2 or 3 as selected but the compiler keeps giving me errors.
    Can someone give me an example of a simple function that will set one of these as highlighted? All I need is the code that basically says for example: "Select Button 1 in the group "radiogroupZ to be selected".
    Thanks

    // This will have the first button selected.
    <mx:RadioButtonGroupd id="radiogroupZ" selectedValue="somethingHere1"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere1" groupName="radioGroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere2" groupName="radioGroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere3" groupName="radioGroupZ"/>
    // To select something in a function
    private function functionName():void
         radiogroupZ.selectedValue = "somethingHere1";

  • How can I make a check box hidden (invisible) if a radio button is selected?

    I am using Adobe Acrobat X Standard, and I can't seem to find a JavaScript that will do what I want.
    I need one check box to be invisible or hidden if a certain radio button is selected.
    Ex: if a user selects "yes" from the radio button list, I need one of 2 check boxes lower on the form to be invisible/hidden/non-selectable.
    Can someone please help me?

    Does this have something to do with a "field dependency" setting within Acrobat itself?
    I am so confused at this point, I don't even know where to look anymore.

  • How to disable when one radio button is selected

    Hi Folks,
    One of our requirement is as follows,
    Scenario: We have two columns with radio buttons and two dropdown box for the same columns to select the values.
    Requirement: When user select one radio button then the other radio button and its relevant dropdown both is disabled.
    Radio Buttons:
    Company
    EmpNo
    Dropdown Box:
    Company
    EmpNo
    If CompName Radio button is selected then Radio Buttom and Dropdown Box for Policy Id is disabled.
    Finally, The filter is applied on CompName to populate the values in dropdown
    Thanks Guys,
    KK

    look for a function like setActive or setDisable

  • Radio button and select option in one line

    Hi,
    I have an requirement in which i need to display the radio button and select option in one line in an report program.
    How can i do it? 
    Regards,
    Arun.

    Hi,
    Try this code.
    TABLES: bkpf.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_r1 RADIOBUTTON GROUP a.
    SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
    SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
    SELECTION-SCREEN POSITION 39.
    SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: p_r2 RADIOBUTTON GROUP a.
    text-001 = " Radio button"
    text-002 = "Posting date"

  • Please help! How can I validate Radio Buttons and List Menu with PHP.

    Hello everyone, I have been learning PHP step by step and
    making little projects.
    The point is I find it easy to learn by doing "practical
    projects."
    I have been reading the David Powers's Book on PHP Solutions
    and it's really great, however there is nothing mentioned regarding
    Validating Radio buttons. I know the book cannot cover every aspect
    of PHP and maybe someone in here can help.
    I have been learning how to process HTML forms with PHP.
    The problem is every book or tutorial I have read or
    encountered fall short on validation.
    I'm wondering how I can learn to validate Radio Buttons and
    Select List Menu.
    I have managed to create validation for all other fields but
    have no clue as to how I can get validation for Radio Buttons and
    List Menu.
    I would also like an error message echoed when the user does
    not click a button or make a selection and try to submit the form.
    I would appreciate any help.
    Patrick

    It's not that default value is "None." In fact it's not. It
    will only be
    "none" when the form is submitted.
    Also if your submit button is names 'send' then
    $_POST['send'] will only be
    set if the form was submitted.
    Make sure you didn't hit the refresh button on your browser
    which usually
    reposts the information. Also make sure you did not reach the
    form from
    another form with the same button names.
    Otherwise paste the snippet.
    Also you can check what fields are set in the post array by
    adding this to
    the top of (or anywhere on) your page:
    print_r($_POST);
    Cosmo
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Off the top of my head this should be no different than
    your radio buttons
    > except that 'productSelection' will always fail the
    !isset check when the
    > form is submitted since the default value is "None", and
    therefore always
    > set. :-)
    >
    > So how about this..?
    > <?php
    > if (isset($_POST['send']) and
    ($_POST['productSelection'] == "None"))
    > {echo "Please select a product.";}
    > ?>
    >
    >
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > > Another question - how do i applied the code you
    just showed me to
    > > select
    > > menu
    > > or select list?
    > >
    > > This is the list:
    > >
    > > <div class="problemProduct">
    > > <label for="productSelection"><span
    class="product_label">Product
    > > Name.</span></label>
    > > <select name="productSelection" id="products"
    class="selection">
    > > <option value="None">-------------Select a
    product----------</option>
    > > <option value="Everex DVD Burner">Everex DVD
    Burner</option>
    > > <option value="Vidia DVD Burner">Vidia DVD
    Burner</option>
    > > <option value="Excerion Super Drive">Excerion
    Super Drive</option>
    > > <option value="Maxille Optical Multi
    Burner">Maxille Optical Multi
    > > Burner</option>
    > > <option value="Pavilion HD Drives">Pavilion
    HD Drives</option>
    > > </select>
    > > </div>
    > >
    > > I thought I could just change the name is the code
    from operatingSystem
    > > to
    > > productSelection.
    > >
    > > Something like this:
    > >
    > > From this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['operatingSystem']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > To this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['productSelection']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > But this does not work, any ideas?
    > >
    > > Patrick
    > >
    >
    >
    >
    >
    > Hey, I tried this about but as you mentioned, since the
    default product
    > value
    > is "None" an error message appears when the page loads.
    >
    > Is there a way to code this things so that even though
    the default value
    > is
    > "None" there ia no error message untle you hit the
    submit?
    >
    > When I applied the code, it messes up the previous code,
    now the operating
    > system is requiring an entry on page load.
    >
    > When I remove the code from the list menu everything
    goes back to normal.
    >
    > I know this is a little much but I have no other
    alternatives.
    >
    > Patrick
    >

  • How to set / reset radio buttons in screen..

    hi,
    i have 4 radio buttons in my screen, initially only the first one must be active and all other must not be in selected state. at any point of time only one must be selected and based on the selection the subscreen area must be filled with the subscreen.
    whats the code to check if the radio button is selected or how to set the action for the radio button selection ?
    also whats the statement to reset the radio button ?
    thks

    You put them all in a radiobutton group.
    For example:
    PARAMETERS: rb_pres  RADIOBUTTON GROUP rbf,"Presentation Server Files
                            rb_app   RADIOBUTTON GROUP rbf."Application Server Files
    The first one is defaulted to "X", but you can also do that yourself.
    You check the value = "X" to see which is selected or say IS NOT INITIAL.
    Hope this helps,
    Mark

  • How to create a radio button on OA Page using Personalization

    I am trying to create a radio button on OA Page using Personalization. The item style , I can see is Message Radio Group.
    How to create Message Radio Button and bring them under one group.
    Thanks

    You should use jdev to define a radiogroup and radio buttons under that, wrap that definition inside a stackLayout in jdev, use personalization to add a stackLayout and extend the region which you had created earlier in jdev.

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

Maybe you are looking for

  • I am looking for a good easy app like quicken 2007 I mostly do my checking

    I am looking for a easy checkbook app that is formated like the old quicken 2007

  • Records not displayed in the WGBEZ field in H_T023_MEPO search help.

    Hello Friends, I have created the search help exit , in that based on the LREF3 , we have to fetch the materail groups. 1.I have written the code in the exit , in the search help exit tables parameter record_tab , the data is coming correctly but whe

  • Parition table question

    Hi, I have created following table in 9.2 db create table t select * from dba_objects; insert into t select * from t; insert into t select * from t; commit; 18:24:49 SQL> create table t1 18:24:56 2 partition by range (created) 18:24:56 3 ( 18:24:56 4

  • Packaged class reference in Reflection

    Hi Everyone, i have a package by name ABC. and inside the same i have another package DEF. Now i have a class in ABC package , say MainClass.java. This program by reflection is trying to get the details of a class in the Package DEF. Let the class it

  • Lost folder. help

    i dropped a folder in the pictures section in finder but it disappeared. right before i dropped an icon of a cloud or something appeared and then the folder was gone. i checked in finder and it wasn't anywhere. it isn't in trash either. anyone know h