Understanding radio buttons, conditions

Hi,
I wondered if anyone can help me get my noggin' around this?
I'm trying to create a survey form in Designer that has the following requirements.
The survey will have a series of 13 questions, many of them requiring 'yes' and 'no' answers - then calculations based upon them.
I'm using radio buttons for users to select either yes or no.
Depending upon whether a user chooses 'yes' or 'no' the form needs to run different calculations.
Hypothetically an example might be: Do you have water-effient shower roses installed in your bathroom? Yes (radio button) No (radio button).
If you answer 'yes', the form runs a calculation, if you answer 'no' the form runs another calculation based on a higher rate of water usage.
Using FormCalc how do I write this?
Using the radio buttons has thrown me! I'm sure it'd be something along the lines of:
If 'yes' then {
Sum(HouseholdTotal * MinuteShower * 52.5)
else
If 'no' {
Sum (HouseholdTotal * MinutesShower * 84)
Probably way off the mark but if anyone can steer me in the right direction it'd be legendary.
Thanks in advance.

Does the page validate?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"ReneeFS" <[email protected]> wrote in
message
news:fp75c2$5ht$[email protected]..
> Radio buttons which I have created in a form work fine
with Internet
> Explorer,
> Firefox and Safari, but disappear when I open the form
in Opera 9.25. All
> I
> see are the words next to the space where the buttons
should be. Is there
> something special I need to do for Opera to make them
show?
>
> <input type="radio" name="radio" id="Visa_yes"
value="Visa_yes" />
> Yes
> <input type="radio" name="radio" id="Visa_no"
value="Visa_no" />
> No </label>
>

Similar Messages

  • Disabling Radio Button Conditionally is not working Well

    Hi friends,
    I have three radio buttons
    <li>self
    <li>New Hire
    <li>On Behalf of
    I will be showing this radio button conditionally according to the user who logs into the application.
    Assume, suppose if a person 'A' enters into the application means he will be shown only these radio button options ---NH---,----OB----,----Self-----
    Suppose, if a person 'B' enters into the application means he will be shown only these radio button options ----NH----,----Self---
    If a person 'C' enters into the application means he will be shown only these radio button options ---Self---
    I have restricted those radio buttons according to the users who enter into the application using their roles.
    But my challenge here is once the user logged in and if he select anyone of the radio button means,
    Example if he selects----NH---means, then ---OB----and -----Self---radio button has to disable and if he selects ---OB----means then ----NH-----and ---Self---has to
    disable(vice versa).
    I have also achieved the same using the DA.
    With true action as: javascript Expression i have given the following codings( i have written the below DA for three cases, if the request_class_code is equal to
    (NH,OB,S)
    var enabled=$v('P22_REQUEST_CLASS_CODE');
    if (!$u_SubString(enabled,'S')) $('#P22_REQUEST_CLASS_CODE_2').attr("disabled","disabled");
    if (!$u_SubString(enabled,'NH')) $('#P22_REQUEST_CLASS_CODE_0').attr("disabled","disabled");
    if (!$u_SubString(enabled,'OB')) $('#P22_REQUEST_CLASS_CODE_1').attr("disabled","disabled"); The above DA is working great only for the user who has the option of viewing three radio buttons in my form(i.e)(NH,OB,S).
    For the user who has the option of viewing two or one radio button, it is not working properly(i.e)(NH,S) or(OB,S) or(S).
    Why it is not working for the user with two options or with one option radio button means, the source of that radio button property is changing. Since i have taken
    the source of my radio button in my DA only when the three options are present.
    How i can solve this issue for the user who is having this two radio option or one radio option.
    Hope you understood clearly about the problem.
    Brgds,
    Mini

    Hi,
    If I did understand what you like have this might work
    var lVal = $v('P22_REQUEST_CLASS_CODE');
    $('#P22_REQUEST_CLASS_CODE input:not([value="' + lVal + '"])').attr("disabled","disabled");Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME

  • Radio button condition

    Hi all,
    I have two items on a page: a radio button ('yes' and 'no' options) and a text item. If I select 'yes' for the radio button item, I want the text item to become read-only. How would I do that?
    Thank you!
    Adina

    I've never used dynamic actions before, sorry. I'm almost completely new to APEX. For the WHEN step, I chose the radio item to be equal to 'yes', for TRUE/FALSE ACTIONS I chose 'disable' and for AFFECTED ITEMS I chose the text item. Nothing happens. The text item is actually a select list. Can that be disabled?

  • How can I get data in radio button?

    I want to get data in same page.while the radio button check ,textbox 's which is in the same page , value can be changeable.what can I understand radio button check or not.
    out.println("<td style=\"width: 16%\"><input type='radio' name='rapor1' value='ithalat' ><B>Ithalat</B></td>");

    do some thing like this,
    var rcb=eval('document.mgmodemsdrivers.portChk');
    or di it by ( .getemenetbyid("xyz") )
    if(rcb.checked==true)
    //do process
    after getting it in var , (.checked) will return checked or not .

  • Can i create conditional Radio Buttons?

    I'm creating forms in Acrobat 9 Pro.
    Does anyone know if it is possible to create conditional Radio Buttons that only need to be checked if a certain box or button from another group is checked?
    For example: the first group of buttons might show the days of the week. If Tuesday was chosen a choice would need to be made from a further group of buttons (say a choice of time - 9am, 10am or 11am.). If any other day was chosen a different choice might be required or none at all.
    I hope this is clear.

    Here are other ways to share your library but it only works if you're both on the same network: Enable Home Sharing under iTunes/File Menu and read the iTunes Help entry for Home Sharing for additional info. It will allow up to 5 computers on your network to play and download items from your iTunes Library. Alternatively, you can enable "Share My Library On My Local Network" under iTunes Preferences which allows up to 5 computers to play any content in your library but without the ability to download them.
    I assume you keep your iTunes Library synchronized on both computers. If you have it also on the MacBook, this Apple support document will explain how to share your iTunes Library with multiple users on the same computer. This is by far the easiest and always available without using the network.

  • Dynamic Select List / Radio Buttons triggering conditional display of field

    Hi HTMLDB Team,
    I wanted to mimic this very nice and useful HTMLDB 'select list feature' at the HTMLDB "Create Application ... from Application Export file " ... option .
    ie when you hit the form that asks you to "install the application", i,e
    Builder - Application >Export Import>Export Repository>Install Application
    you have the the following radio Options :
    Install As Application
    X Reuse Application ID 401 From Export File
    X Auto Assign New Application ID
    X Change Application ID
    New Application
    The "New Application ID" field appears only when I select "Change Application ID" radio option. That great and that's exactly what I want.
    How do you do that ?
    I am currently using a select list instead of radio list. It's the same thing ... I
    I tried " many options of the "select list with redirect .... with submit .... but I was not successfful. All I am trying to achieve is to offer a list of departments ... but when the user select "other", I want to show a text field for the user to type in the "other Department" ... without losing what I had already entered in the form previously and without actually Submitting the form . I still have other fields to enter after the select list .
    Is that possible with pure HTMLDB ?
    Or do I have to craft up some Javascript .
    I'd prefer pure HTMLDB .. I do not want to use javascript, to avoin a maintenance nightmare once I submit the code to other developers ...
    Can you pls help ?
    Thanks a lot.

    Hello,
    Take a look at these built in javascript function
    they should give you what you want.
    http://htmldb.oracle.com/pls/otn/f?p=11933:39
    CarlCarl,
    if I understand it right, these functions are already built in Apex 2.2.1.
    I need to show an item with label when user selects certain radio button. This sounds like the opposite to f_Hide_On_Value_Item_Row function.
    Can this task be done with apex built-in javascript functionality at this moment?
    Thanks

  • "Filter the LOV based on the selected conditions" RADIO BUTTON doesn' work

    Hi All, I'm trying to create a cascading parameters mechanism, but I found certain difficulties.
    I need to have 2 LOV connect: the master LOV retrieve a list of User's groups, and the detail LOV has to retrieve only the customer's categories that come from the user's groups selected.
    So, in order to retrieve the values I defined on the Administrator:
    1) one custom folder for the master LOV (list of the User's groups) and another custom folder for the details LOV (list of the customer's categories).
    2) The 2 LOV as item classes
    On Discoverer Plus, following the manual ("About filtering lists of parameter values based on selected conditions ("cascading parameters"), I tried to create thw first parameter based on the master LOV, but I DON'T have the radio button "Filter the list of values based on the selected conditions" enabled !!!...I CAN'T USE IT !
    If this radio button is not enabled, I can't link the master parameter with the detail parameter.....
    Anybody can help to discoverer what I missed during the creation of cascading parameters ?
    Thanks in advance for your help
    Alex

    Hi Manav, thanks for your reply !
    I resolved the problem, linked the two custom folders with a join !
    The radio button didn't work just only the parameter where condition has to be deselected and then re-selected !!
    Alex

  • How to use Radio buttons in WAD to select different condition in a query

    Hi Guru,
    I am new to WAD, I want to use radio buttons in selection screen of query for different selections based on selection criteria. I am aware of executing different queries using different radio buttons. but i want to use single queries for different radio button selections.
    I have found some relevant topic to it but not got exact solution. Please guide me.

    Hi Avinash,
    Drag a DropDown webitem into your template. Under DropDown webitem properties, Data Binding -> Fixed List of Options.
    Fixed Option -> Action -> Command via Command Wizard, Command -> Commands for Data Providers -> Data Provider Commands for Filter Values -> SET_SELECTION_STATE_SIMPLE. Data Provider Affected -> choose the main DP Query here. Characteristic -> choose Employee Group characteristic here as present in your DP Query. Sign -> INCLUDING, Operator -> EQUAL_SELECTION, Equals -> MEMBER_NAME, Member Name -> specify the value here i.e. Employee1 etc.
    Repeat above Fixed Option step for Employee2, Employee3 etc. selections. For 'All' option choose Command CLEAR_SELECTION_STATE with Data Provider Affected as the main DP Query & Characteristic as Employee Group.
    --Priya

  • Conditional Radio Buttons

    Okay I have a 2 page document. On Page1 I have radio buttons: RadioGroup1; radio1 = 0, radio2 = 1, radio3 = 2; RadioGroup2; radio4 = 0, radio5 = 1, radio6 = 2. On Page2 I have a textbox that will display sentences based on the selection from the Radio Groups. If the person selects radio2 or radio3 the following will be displayed in the textbox on Page2; "Group 1 is greater than 0". If the person selects radio5 or radio6 the following will be displayed in the textbox on Page2; "Group 2 is greater than 0". If the person select a combination of those, they will get both messages to display together. I tried using the "change" event on each of the Radio Groups.
    topmostform.Page1.RadioGroup1::change - (JavaScript, client)
    If (this.rawValue > 0){
    Page2.textbox.value ("Group 1 is greater than 0. \n");
    topmostform.Page1.RadioGroup2::change - (JavaScript, client)
    If (this.rawValue > 0){
    Page2.textbox.value ("Group 2 is greater than 0. \n");
    Nothing is displaying in the textbox. Any help would be grateful.

    Hi,
    It may just be the way the code snippet is pasted into the post, but the "if" in the statement should be a lowercase 'i".
    The first one is missing "0)" in the if statement, but I am guessing that you have this in the script.
    I am sorry, but I am not firing on all cylinders, the script settign the value of the textbox is incorrect. I didn't spot that until now:
    if (this.rawValue > 0)
         Page2.textbox.rawValue = "Group 1 is greater than 0. \n";
    That should work,
    Niall

  • Addressing Individual Radio Buttons Using Conditional Statements

    Hello Everyone
    I don't know a lot about writing code, just basic things.  The last thing I touched was C++ while in college and that was over 10 years ago.  However,
    I have four radio buttons. let's say A, B, C, and D.  Using Acrobat 8 and FORMCALC, is there a way to address each individual radio button in an IF/THEN statement?  For example, if A is selected, then display the number 1, if B is selected, display the number 2 and so on.  Apparently, these buttons are sub-components of a main object, I get errors when I try to refer to each sub-component.  Any help would most certainly be welcomed.
    Thanks
    Daryl

    Unfortunatley, my inexperience with this language and working with objects will become apparent b/c I am having problems with the syntax as you'll see below.
    >The RadioButtonList name is "RObject1"
    >The three individual radio buttons are named R1, R2 and R3 with values of 30, 60, 90 respectively
    >A numeric field named NField1 is supposed to display which radio button is selected
    >Using FormCalc, the following script was used:
              if (RObject1=30) then NField1=30 else Field1=0 endif
    >I used "calculate" as the event and committed the changes.
    The below error is generated:
    Script failed (language is formcalc; context is xfa[0].form[o].form1[0]#subform[0].NField1[0])
    script=if (Object1=30) then NField1=30 else Field1=0 endif
    Error: syntax error near token'=' on line 1, column 12
    Obviously, my supposing that RObject1 would take on the value of whatever button was selected does not seem to be the case or I am incorrectly addressing the object.
    Thanks

  • HELP! I need help to understand how to get value on radio buttons!

    hello,
    I realy need the help from anyone that knows how to get value from radio buttons in a JSP.
    I have this :
    <%
    java.util.Vector vLinha = (java.util.Vector) datos.get("ConsNefect");
              java.util.Hashtable ordens;
              java.util.Enumeration eLinha = vLinha.elements();
              String t = "radio";
              String x = "escolha";
              String l = "";
    int i = 0;
              //int esc = 0;
    String fila = "";                         
              boolean bol = true;
    while (eLinha.hasMoreElements())
    ordens = (com.ibm.dse.base.Hashtable) eLinha.nextElement();     
              if (++i%2 == 0)
    fila = "formgriscla";
    else
    fila = "formgrisosc";
    out.println("<tr>");
    out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"dato2\">");          
              out.print("<a href=" + urls.get("action"));
         out.print("&sequencia=" + (String) ordens.get("sequencia"));                    
         out.print(">");
              out.print((String) ordens.get("descricao"));
         out.print("</a></p></td>");
              out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"datop\">");          
              out.print((String) ordens.get("datap"));
    out.print("</p>");
    out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"datop\">");
    out.print((String) ordens.get("erro"));
              out.print("</p>");
              out.println("<td class=\"" + fila + "\">");
              out.print("<p class=\"datop\">");     
              l = (String) ordens.get("sequencia");     
              out.println("<input type=\"" + t + "\" name=\"" + x + "\" value=\"" + l + "\">");          
              out.print("</p></td>");      
              out.println("</tr>");
              //esc++;
    %>
    <!--input type="Hidden" name="escolha" value=<!--%l%>-->
    <!--input type="Hidden" name="escolha" value="<!--%=escolha%>"-->
    </td>
    </tr>
    I don�t know how to take the value... PLEASE HELP ME OUT!
    THANKS TO ALL!,
    Best wishes,
    Alex (portugal)

    You must wrap your contents into a FORM element and, then, using getParameter("escolha"), retrieve your value.

  • Values of checkboxes and radio buttons not recognised

    Hi folks,
    I have a bit of a strange problem and I'm hoping you can help shed some light.
    Basically I have a form with various elements in it, some of which seem to have a problem telling my pl/sql code what their values are. The culprits seem to be radio buttons and check boxes. Now those are individual items created with the wizard within a specific section if the outcome is different from sql created form elements in tables.
    The radio buttons is one field, let's call it :P100_RADIO which returns either 'AB', 'CD' or 'EF'. The checkbox, let's call it :P100_CHECKBOX is just one checkbox returning the value 'Y' if it's checked.
    after submit, I have a process which among other things checks the value returned by those two elements to set a variable v_paid either as 'Y' or 'N'
    as a small summary of what I'm trying to do, here's a code snippet:
    v_checkbox varchar2(1);
    v_paid varchar2(1);
    begin
    v_checkbox := :P100_CHECKBOX;
    if v_checkbox is not null AND :P100_RADIO = 'CD' THEN
      v_paid := 'Y';
    else
      v_paid := 'N';
    end if;
    end;If I submit my form I get the error message
    "ORA-06502: PL/SQL: numeric or value error: character to number conversion error"If I change the condition to v_checkbox is not null only, I get the same error
    If I change it to v_checkbox != '' I don't get an error but v_paid is set with 'N'
    If I change it to v_checkbox = 'Y', I get the same error again
    If I change it to *:P100_RADIO = 'CD'* only, I get the error as well.
    I also mistakenly tried v_checkbox is null and it submitted fine, though the value of v_paid was still 'N'
    I've tried changing the varchar2(1) to something greater, up to varchar2(4000) but that didn't make any difference.
    So I seem to understand there's a discrepancy of types somewhere but I can't work out where or how to change that. In my code an insert is performed after the if statement and the value of :P100_RADIO is added to the table with the expected value.
    After looking at the source of the page produced by Apex, I also tried to replace :P100_CHECKBOX with :P100_CHECKBOX_0 but that didn't make a difference either. It's possible Apex thinks :P100_RADIO and :P100_CHECKBOX are supposed to return some sort of arrays but just why it would just return a string in an sql statement beats me.
    The worst thing is, I'm fairly certain the code worked the first time I implemented it. So if anyone has any idea of what's going on that would be quite helpful. As always, I have a nagging suspicion it's a silly tiny mistake somewhere I just can't see.
    Thanks folks :)

    okay here's the code for the whole procedure. Some variable names have been changed but it's otherwise the same code:
    DECLARE
    v_total_cost     NUMBER(10,2);
    v_deposit        NUMBER(10,2);
    v_remaining      NUMBER(10,2);
    v_payment_type   varchar2(2);
    v_checkbox       varchar2(4000);
    v_user           varchar2(4000);
    v_bok_paid       varchar2(1);
    v_msg            varchar2(4000);
    BEGIN
    v_total_cost     := :P100_COST;
    v_deposit        := :P100_DEPOSIT;
    v_remaining      := v_total_cost - v_deposit;
    v_payment_type   := :P100_PAYMENT_AMOUNT;
    v_checkbox       := :P100_CHECKBOX;
    v_user           := :APP_USER;
    --wwv_flow.debug('before condition');
    if v_checkbox != '' AND :P100_RADIO = 'CD' THEN
      v_bok_paid := 'Y';
    else
      v_bok_paid := 'N';
    end if;
    --wwv_flow.debug('after condition');
    IF v_payment_type  = 'D' THEN
    :P100_AMOUNT_TO_PAY := :P100_DEPOSIT;
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_deposit, v_payment_type, v_bok_paid, :P100_RADIO, SYSDATE, v_checkbox, v_user);
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_remaining, 'L','N', null, SYSDATE, v_checkbox, v_user);  
    ELSIF v_payment_type  = 'F' THEN
    :P100_AMOUNT_TO_PAY := :P100_COST;
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_total_cost, :P100_PAYMENT_AMOUNT, v_bok_paid, :P100_RADIO, SYSDATE, v_checkbox, v_user);
    END IF;
    :P100_TRANSACTION_FLAG := '1';
    if v_bok_paid = 'Y' then
    v_msg := '<div>Message clipped</div>';
    --send confirmation email
    GLO_CORRESPONDANCE.proc_corr_controller(
    :P100_BOOKING_MEMBER_ID,
    :P100_BKG_ID,
    null,
    v_msg,
    'E',
    'Payment confirmation',
    null
    end if;
    END;Thanks :)

  • Read-only radio button or checkboxes save as null

    Hi,
    I have a form with some fields that are editable by 1 group of users and read-only for another group in certain conditions.
    Before the header there is a fetch process to retrieve values from tables. So most fields (read-only & editable) are populated including checkboxes & radio buttons.
    All users can edit at least 1 field on the form.
    When the save button is pressed a PL/SQL process runs to save the data.
    The save works if the field is editable.
    If the field is read-only and text it also works.
    But if the field is a radio button or checkbox a null is saved in the table.
    Any suggestions on how to get the PL/SQL to pick up the read-only radio buttons and checkbox values?

    Hi,
    I had the same problem in my application and I found another solution instead of using two items. I'm using a computation on page processing that makes a select on my table to get the value for the checkbox. I'm doing this with the same condition as my read-only condition on my checkbox item so I can get the database value when it is lose in the submit process.
    Also, I found a difference in the html code between the read-only state of the item and the standard state.
    Original state : name="p_v07" (7 because it's the seventh item on my page)
    Read-only state : name="checkbox"
    I tried to modify this using firebug in execution of the page but without success, the problem is still there.
    Patrick
    Insum Solutions

  • How to create a radio button that changes colors

    I'm using Acrobat X and ID CS5 on Mac OS X.
    A couple of years ago someone on the forums explained to me how to create a button that changes color with each click. You can view a sample PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle.pdf. They gave me the document JS and showed me how to set the properties of the button. I've integrated the button into a particular series of PDF forms and it's worked out very well.
    Now I would like to do the same thing, but using a circle instead of a square. Can anyone tell me the best way to do this? Can I somehow set a radio button to cycle through colors in the same way? I design my forms initially in ID CS5 and then activate and format the fields in Acrobat X. I've tried using circles instead of squares in my ID document, but when I export to an interactive PDF, they're converted to squares.
    Any ideas?

    I understand how to make buttons cycle through colors-- the problem I'm having is that I'm trying to figure out how to make a circular button cycle through colors. When I export my ID document to PDF, my round button maintains it's original appearance, but when I click on it to cycle through the colors, it behaves like a square (see new PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle2.pdf).
    If I use a radio button, I can get it to cycle through colors, but I don't want it to have a black dot in the middle. Is there a way to format the radio button to not show the black dot when clicked?

  • How to select a radio button using javascript?

    Hi,
    I have 2 radio buttons as shown below:
    <input id="poBoxRadio" name="poBoxRadio" type="radio" class="radio-btn" value="No" /> No
    <input id="poBoxRadio" name="poBoxRadio" type="radio" class="radio-btn" value="Yes" /> YesI want to select one of this radio button, according to the following condition in javascript:
    <script type="text/javascript">
    if (<%=option1%> != ""){
         // Radiobutton "No" should be selected.
    else if (<%=option2%> != ""){
         // Radiobutton "Yes" should be selected.
    </script>How can I do this in Javascript? Any help will be highly appreciated.
    Thanks,
    Rishi

    I have solved this issue using the following:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    var a='', b='d';
    </script>
    </head>
    <body>
    <input id="poBoxRadioNo" name="poBoxRadio" type="radio" class="radio-btn" value="No" /> No
    <input id="poBoxRadioYes" name="poBoxRadio" type="radio" class="radio-btn" value="Yes" /> Yes
    <script type="text/javascript" defer="defer">
    <!--
    if(document.getElementById){
    if (a != ""){
    // Radiobutton "No" should be selected.
    document.getElementById('poBoxRadioYes').checked = false;
    document.getElementById('poBoxRadioNo').checked = true;
    else if (b != ""){
    // Radiobutton "Yes" should be selected.
    document.getElementById('poBoxRadioNo').checked = false;
    document.getElementById('poBoxRadioYes').checked = true;
    // -->
    </script>
    <input disabled type="button" value="UP" onclick="setVariable('move=1')">
    </body>
    </html>Thanks to all of you!

Maybe you are looking for