Using a radio button in cfmail / form.

Hello;
This is a silly question, but I can't remember how to program in radio buttons for a cfmailer. I have 3 radio buttons, basically, I just need to know what the users choice was when they checked it off. The following is my radio buttons and what I have for code right now. But I'm not grabbing the proper variable, I also tried dumping a few diffrerent variables to see if I could get it.
<input name="type" type="radio" onClick="setVisibility('sub3', 'inline');setVisibility('sub4','none');setVisibility('sub5','none');" value='male' checked="checked"/>Magnets
<input type="radio" name="type" value='female' onClick="setVisibility('sub3', 'none');setVisibility('sub4','inline');setVisibility('sub5', 'none');"/>Paper Steel
<input type="radio" name="type" value='child' onClick="setVisibility('sub3', 'none');setVisibility('sub4','none');setVisibility('sub5', 'inline');"/> both
on my response page, I tried this:
<cfif form.type EQ "male">
if this was their choice, then this set of rules would apply
</cfif>
and so on for the other two choices. This isn't catching my buttons, what am I doing wrong? do I need to make a paramiter for the radio buttons before I can allow it to function? like this?
<cfparam name="FORM.type" default="">
then I can use my if statement? (that isn't working right now either)
here is what I'm trying to dump:
<cfdump var="#form.type#">
<cfabort>
</cfdump>
How do I do this? Can anyone help me?

I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
<!--- contents of input.cfm --->
<html>
<head>
     <title>Input</title>
</head>
<body>
     <form action="action.cfm" method="POST">
          Choose type: <br />
          <input name="type" type="radio" value="male" />     Male<br />
          <input name="type" type="radio" value="female" /> Female<br />
          <input type="submit" />
     </form>
</body>
</html>
<!--- content of action.cfm --->
<html>
<head>
     <title>Action</title>
</head>
<body>
     <cfif form.type eq "male">
          Type is male.
     <cfelseif form.type eq "female">
          Type is female.
     </cfif>
     Here is a cfdump of the form variables:<br />
     <cfdump var="#form#" />
</body>
</html>
Message was edited by: JR "Bob" Dobbs
Added sample for action.cfm

Similar Messages

  • Regarding use of radio button

    Dear All,
       I add two radio button in my form. And they work. One button for 'male' and another for 'female'.
    When i click male button then it sends '1' to database in the respective field and
    when i click female button then it sends '2' to database.
    But i need 'M' for male and 'F' for female.
    what is the solution.
    Good day.
                                                                                  Regards
                                                                 Bodhisatya Bhattacharjee

    Try something like this for the first Option button ...
            Dim oOptionBtn As SAPbouiCOM.OptionBtn
            With oItem
                .Left = 100
                .Top = 100
                .Width = 50
                .Height = 20
                oOptionBtn = .Specific
            End With
            With oOptionBtn ' data bind
                .Caption = strCaption
                .ValOn = 'M'
                .ValOff = 'F'
                If Len(strGroupWith) > 0 Then .GroupWith(strGroupWith) ' Use tihis to group the option buttons
                If Len(Trim(strFieldName)) > 0 Then .DataBind.SetBound(True, "", "FIELD1")
            End With
    and then set the
    ValOn = 'F'
    and .
    ValOff = 'M'
    for the other button.
    hope it works for you
    null

  • Creating radio buttons in XML Forms Builder

    Hi everyone,
    I can't seem to find any instructions on how to create Radio Buttons in XML Forms builder, anyone has a link or instruction on how to?
    Thanks,
    Samer

    Hi Samer,
    So taking the example for the slides, you need first to create a new child under DataModel for the DataSchema. You can name it "Gender".
    Click on the Radio Button in the Toolbar and drag "Gender" from the left hand site into the Edit Form.
    It should have already a first radio button and in the box on the bottum right you should see the reference in the Schema Reference field (/DataShema/DataModel/Gender).
    You can now drag a second button from the toolbar and place it behind the first one. Make sure you add the same value in the Schema Reference field.
    On the Show form or RenderListItem you need a Control Selector as mentioned on slide 18. You can just use right mouse click -> Add. Go on the new item on the right hand side, and click on "Add Multiple Labels". You can choose now how many radio buttons you have, here 2.
    In our example enter in one Label "Condition" = "true" and "Label" = "Male" and in the other "Condition" = "false" and "Label" = "Female".
    Finally, make sure that the Control Selector has the Schema Reference also as defined above (/DataShema/DataModel/Gender).
    Hope this helps,
    Robert

  • Using the radio button component to go to a frame on a MovieClip

    hello,
    I am using the radio button component in Flash with a continue button.
    When the user clicks their option in the radio button and then clicks continue, I want it to go to a movieClips Specific frame.
    Here is the breakdown and the script I have so far is below.
    The radio group os named RadioButtonGroup
    The instance names for each of the three options are noviceButton,intermediateButton,expertButton
    My continue button has an instance name of continueButton
    and my movie clip I am trying to target has an instance name of level_mc
    here is my code so far:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    gotoAndStop (frameNumber);
    the problem starts with my varFrame line-I don't know how to get it to go to the movieClip and gotoAndStop at a specific frame, based on which radio button was clicked and after the continue button is clicked.
    Does anyone out there have any ideas?
    thanks
    babs

    use:
    continueButton.enabled=false
    noviceButton.addEventListener(MouseEvent.CLICK, revealContinue);
    intermediateButton.addEventListener(MouseEvent.CLICK, revealContinue);
    expertButton.addEventListener(MouseEvent.CLICK, revealContinue);
    function revealContinue(evt){
        continueButton.enabled=true;
    continueButton.addEventListener(MouseEvent.CLICK, clickContinue);
    function clickContinue(evt){
    var frameNumber=mc_levels.Number(noviceButton.group.selectedData)
    level_mc.gotoAndStop (frameNumber);

  • How to write a numeric value to a plc register using a radio button

    I'm want display a HOA (HAND/OFF/AUTO) on my screen. Lookout is connected to a Allen Bradley PLC. I am trying to write to a "N" register. I want to write a zero to open all (eg) N7:10 bits, writing a one (1) will close a contact N7:10/0 and writing a two (2) will close N7:10/1 etc. How do I do it? Can I use a radio button and if so, how?

    ICI,
    Just wanted to let you know that you have posted your question in the
    MATRIXx part of the forum.  There is a specific board for
    Lookout.  If you repost your message there you will be more likely
    to get a good answer.
    Carl L
    National Instruments

  • 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.

  • Using a Radio Button to Disable Multiple Checkboxes

    Hi everyone,
    My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
    The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
    Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
    Christian

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Using a radio button to populate another group of radio buttons?

    I am new to Adobe forms and new to Javascript. I have a question on my form with a radio button group (PHQ) with four choices 1, 2, 3 or 4. If the user chooses "1", I want a check to appear in the "No" box for another radio button group (Screen). If, on the other hand, the user chooses 2, 3, or 4, from the PHQ group, I want a check to appear in the "Yes" box of the Screen group. Is this possible? Not sure how to go about doing this.

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • Autofill a radio button using other radio buttons

    I would like a question on my form "Q24 Decrease Smoke" (set of "Yes"/"No" radio buttons) to auto fill with a response of "No" if the user selects "Not at all" to 3 other questions (also sets of radio buttons).  If the user selects any other response to any of these 3 questions, I want the user to be able to manually select either "Yes" or "No". This is the code that I've tried, under the Mouse Up event of the "No" radio button option for Q24:
    var a = getField("Q20 Smoke Cig").value;
    var b = getField("Q22 Smoke other forms").value;
    var c = getField("Q23 chew/snuff").value;
    if(a=="Not at all" && b=="Not at all" && c=="Not at all") event.value = "On";
    I'm new to Javascript, so am not entirely sure I am on the right track or what might be wrong here. Any help would be greatly appreciated. Thanks!

    Have you tried to the set the value to to "No"?
    The "Mouse Up" action only works when there is a "Mouse Up" action for the field.
    I would look at using the script in the 'On Blur" action for the 3 fields with adjustments for the fields as needed for the field where the script is used.

  • Deselecting radio button in Adobe Forms Central

    When creating a form using Adobe Forms Centralsolution, I use, very often, the radio button selection option. But I notice that when this isn't a required field, and people try to undo their selection, they can't. They can only choose another option, but can't just unselect it and live all the options unchecked, right?
    Is there any I can make it work this way, I mean, make it possible for people who checked an option by mistake and don't want to leave any option checked, just unchec it?
    Thanx

    Sorry it is not possible to unselect a radio button. What I can suggest it to add a choice like "none of the above".
    Gen

  • Cannot save checked radio buttons in pdf forms

    I am using form 1023 from the IRS which has a series of "yes" and "no" radio buttons that need to be checked. The problem is that each time I check my responses and save the pdf, it opens with my filled info still intact (i.e. my name, etc...), but none of the boxes are checked.
    Help, please?

    Sylvie617 wrote:
    I am using form 1023 from the IRS which has a series of "yes" and "no" radio buttons that need to be checked. The problem is that each time I check my responses and save the pdf, it opens with my filled info still intact (i.e. my name, etc...), but none of the boxes are checked.
    Welcome to Apple's discussion groups.
    If you're using Apple's Preview application, for this particular PDF file you might try the Adobe Reader application instead:
    http://get.adobe.com/reader/

  • 2 sets of Radio Buttons in a Form-complications

    Hello everyone,
    I have been looking around for code to assist me in building a form. I have developed the form, and just have a couple problems that I can't figure out.
    In one question on the form the user can choose from one set of radio buttons and select one of the five options. Then I have a second set of radio buttons, that the user can again only choose one option. My problem is that I only want the user to be able to select from the second set of radio buttons if they selected a certain option in the first set. An example to clear up my problem:
    Did you finish the training:
    Yes
    Half
    None
    So if the user selected yes from the first set of radio buttons, I want the second set of radio buttons to now be selectable:
    The training was:
    Up-beat and enjoyable
    Snoozer
    The conditions that I am using are very different than these but this is just a simple skit. So how do I make the second set of radio buttons unselectable until the user selects a specific radio button from the first set of radio buttons.
    Thanks, I really appreciate the help!

    If you have a radio button exclusion group called 'completion' with three items 'Yes','Half', and 'None' and a second radio button exclusion group called 'completion', go to the 'feedback' Value tab and set the type to 'readOnly'.
    Add the following script to the 'completion' change event...
    // form1.page1.subform1.completion::change - (JavaScript, client)
    if (this.rawValue == "Yes") {
      form1.page1.subform1.feedback.access = "";
    else {
      form1.page1.subform1.feedback.access = "readOnly";
      form1.page1.subform1.feedback.rawValue = "";
    If the user selects 'Yes', the 'feedback' group is available for selection. If the user does not select 'Yes', 'feedback' is reset and made readOnly.
    Steve

  • Enable/disable/defaulting the radio button in tabular Form

    Hi friends,
    I have one radio button column in my tabular form with 3 values for it.
    <li>FC
    <li>BC
    <li>EC
    I need to enable/disable the radio buttons according to the position of the user.
    If the position of the user is CEO means,
    then FC radio button has to be checked defaultly and also for him he needs to have BC and EC radio buttons to be enabled.
    If the position of the user is between(1-4) grades means,
    then FC radio button has to be disabled, but BC radio button has to be checked defaultly and also for him he needs to have EC radio buttons to be enabled.
    If the position of the user is between(4-6) grades means,
    then FC, BC radio button has to be disabled, but EC radio button has to be checked defaultly.
    How i can achieve this radio button enabling/disabling and defaulting it dynamically according to the user.
    Where i need to specify this kind of restriction inorder to work for me in my application.
    Brgds,
    Mini

    Hi Bob,
    thanks for your reply first, and your suggestion too.
    I tried in the below manner on the lov definition of my radio button and it hide/shown according to the user who logs into the application.
    SELECT 'FC' d, 'FC' r FROM DUAL WHERE lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO')
    UNION ALL
    SELECT 'BC' d, 'BC' r FROM DUAL WHERE lower(:APP_USER) IN (select lower(user_name) from apps.xxhy_ams_details_v where grade_name
    BETWEEN 1 and 4 OR lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO'))
    UNION ALL
    SELECT 'EC' d, 'EC' r FROM DUALBut how i can check the radio button defaultly according to the user who logs in .
    <li> If the employee with the position CEO logs into the application means, he needs to have FC to be checked defaultly.
    <li> If the employee with the grade between(1-4) logs into the application means, he needs to have BC to be checked defaultly.
    <li> If the employee with the grade between(5-12) logs into the application means, he needs to have EC to be checked defaultly.
    Note:
    Instead of hide/show the radio buttons defaultly whether it is possible to enable/disable the radio button according to the user who logs into the application.
    Brgds,
    Mini...

  • Using CheckBox / Radio-Button Control in Dialog Program

    Dear Friends,
    Please let me know the way to use check-box / radio-button control in dialog programs. Where & how to define them & write the logic.
    If possible provide a small example.
    Regards,
    Alok.

    Hi,
    goto tcode abapdocu.. abap user dialogs - screens-processing screens you will get examples for all --pushbutt6ons radiobutton checkboxes everything
    <b>here is a sample code for you</b>
    PROGRAM demo_dynpro_check_radio .
    DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
          field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,
          box TYPE c.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    CALL SCREEN 100.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'RADIO'.
          IF radio1 = 'X'.
            field1 = 'Selected!'.
            CLEAR: field2, field3.
          ELSEIF radio2 = 'X'.
            field2 = 'Selected!'.
            CLEAR: field1, field3.
          ELSEIF radio3 = 'X'.
            field3 = 'Selected!'.
            CLEAR: field1, field2.
          ENDIF.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.
    <b>flow logic:</b>
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    regards,
    pankaj singh.
    <i><b>
    reward if helpful</b></i>

  • Get the row of a department in a popup using a radio button

    I have a use case. A page will be displayed with a button. User will click on that button, and then a popup will be displayed showing the table of departments. User will select the desired radio button. After that, the popup will close and the list of employees should get displayed in the page.
    I have written a method in the valuechangeevent property of the radio button (autosubmit is also set as true), but still I am not able to get the current row. I actually need the value of departmentid.
    Can anyone guide me?
        public void onClickRadio(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            System.out.println("onClickRadio Begins");
            hidePopup("p1");
            DCBindingContainer bc =
                (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding iter =
                bc.findIteratorBinding("DepartmentsView1Iterator");
            Row row = iter.getCurrentRow();
            Number departmentId = (Number)row.getAttribute("DepartmentId");
            System.out.println("departmentId: " + departmentId);
            OperationBinding method =
                (OperationBinding)bc.get("displayEmployeeTable");
            method.getParamsMap().put("departmentId", departmentId);
            method.execute();
            AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
            System.out.println("onClickRadio Ends");
        }JDev 11.1.1.6

    This is the code of the popup.
            <af:popup id="p1" contentDelivery="lazyUncached">
              <af:dialog id="d2" type="none">
                <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                          var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
                          emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                          rowBandingInterval="0"
                          selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
                          selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                          rowSelection="single" id="t1">
                  <af:column sortProperty="Radio" sortable="false" id="c1"
                             width="20">
                    <af:selectBooleanRadio value="#{row.Radio}" id="ot3"
                                           valueChangeListener="#{myBean.onClickRadio}"/>
                  </af:column>
                  <af:column sortProperty="DepartmentId" sortable="false"
                             headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                             id="c2">
                    <af:outputText value="#{row.DepartmentId}" id="ot2">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
                    </af:outputText>
                  </af:column>
                  <af:column sortProperty="DepartmentName" sortable="false"
                             headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
                             id="c3">
                    <af:outputText value="#{row.DepartmentName}" id="ot1"/>
                  </af:column>
                </af:table>
              </af:dialog>
            </af:popup>I think that when I select the radio button, the value might be getting true of the column, but this isn't setting the current row.
    Also in the log I am getting these messages:
    <SimpleSelectBooleanRadioRenderer> <renderGroupAttribute> The selectBooleanRadio component's group attribute is null. It must be set to a non-null value for the selectBooleanRadio component to function properly. The selectBooleanRadio component is meant to be used with other selectBooleanRadio components with the same group value.

Maybe you are looking for

  • Can 2 different iPhones be supported by 1 iTunes library?

    Scenario: 1 spouse is no longer able to maintain the content in their iTunes' library and wishes to combine content of the 2 libraries into a singular instance. Assumptions: Each phone would share the same iTunes' Library (i.e. Songs, Movies, TV Show

  • Invalid Number?

    Hello, I have created some functions and a procedure to call them. I cannot seem to find the error that is being generated by SQLPlus when I execute the procedure. It seems to be a simple one, but I need at least one more pair of eyes to look for the

  • ITunes 11.2.2(3) sudden open and start playing music

    Greetings everyone. I have problem that occur in my Mac product below MacBook Pro 15-inch, Mid 2012 Software  OS X 10.9.4 (13E28) <--- which is mavericks version my question as above title, my iTunes sudden start playing music without clicking the ap

  • Netflix, Safari, Lion, and Silverlight

    I recently installed OSX Lion on my 2009 MacBook Pro. Today I tried streaming on Netflix and it worked properly for a few minutes until it froze and I received a kernel panic. I restarted my computer and was promted by Netflix to delete Silverlight a

  • Recovery lost  undo tablespace and Redo log

    Recovery undo tablespace [email protected]> shutdown Database closed. Database dismounted. ORACLE instance shut down.e [email protected]> exit Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partiti