Radio buttons that pass a value to a textfield

Hi everybody;
I’m trying to create a “Rating Matrix” for the evaluation of new raw material. On this form I create a group of radio buttons (i.e. Radio1 to Radio5).
Each radio represents a rating value “Poor=1, Fair=3, Average=5, Good=7, Excellent=9” and I would like to capture this rating (1 or 3 or 5, etc) into a Texfield.
I work in solving this issue without success, if any of you have any example that I could look at it, I will really appreciate.
Thanks in advance.

Thanks for your fast response! WowWhat I'm trying to do, is being able to pass a value to a TextField depending on the ratio button selected.If I choose one of the ratio buttons of the group "Opacity" (Opacity1, Opacity2, Opacity3, Opacity4 or Opacity5), I like the TextField "Rank" to show the value.If Opacity1 selected, Rank field value = 1.If Opacity2 selected, Rank field value = 3.If Opacity3 selected, Rank field value = 5.If Opacity4 selected, Rank field value = 7.If Opacity5 selected, Rank field value = 9.
You think this can work?
if(Opacity1.value == "On") {Rank.value==1; // value is added to the texfield;}
if(Opacity2.value == "On") {Rank.value==3; // value is added to the texfield;} Else if(Opacity3.value == "On") {Rank.value==5; // value is added to the texfield;}
Sorry not a programmer.I understand the loop, but is not very clear where I need to add this script, on the radio or in the textfield?Thanks.
Date: Thu, 18 Jul 2013 11:48:28 -0700
From: [email protected]
To: [email protected]
Subject: Radio buttons that pass a value to a textfield
    Re: Radio buttons that pass a value to a textfield
    created by GKaiseril in JavaScript - View the full discussion
Do you want to count the occurrence of each value and report that in a given text field?
Do you understand that when no radio button or check box when not selected has a value of the string "Off".
Assuming that the value for various radio buttons in a group is the value you want to test
// custom calculation script;
// count occurrences of "9" values
var nTest = 9; // value to test for;
var nCount = 0; // count of occurrences;
// loop through the fields;
for(i = 1; i < 6; i++) {
var nValue = this.getField("Radio" + i).value;
// test if field value equals test value;
if(nTest == nValue) {
nCount++; // values equal so increment count;
} // end test of field value
} // end field name loop;
event.value = nCount; // set field value;
// end custom calculation script;
     Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5518047#5518047
     Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5518047#5518047
     To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5518047#5518047. In the Actions box on the right, click the Stop Email Notifications link.
     Start a new discussion in JavaScript by email or at Adobe Community
  For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Similar Messages

  • I have a radio button that loses value on validation error

    Hi All,
    I have a radio button that is normal and then goes to readonly when a condition is true. The page has region with items as well as a tabular report region
    While in readonly state any validation error will cause the radio button to loose it's value.
    ?? Is this a bug or am I doing something wrong?
    Bill

    OK, Got the checkbox working...
    function SaveRes() {
    $x("P36_PRIORITY_RB").disabled=false;
    elmName = $x('P36_I_PRIORITY_0').name;
    elm = document.getElementsByName(elmName);
    for (i=0; i<elm.length; i++) {
    elm.disabled=false;
    doSubmit('SAVE');
    BUT ---- this part is now firing at the page rendering and doesn't fire when a validation is hit...
    DECLARE
    l_DynJS VARCHAR2(2000);
    BEGIN
    l_DynJS:='<script type="text/javascript"> '||chr(10)||
    ' $x("P36_PRIORITY_RB").disabled=true; '||chr(10)||
    ' elmName = $x(''P36_I_PRIORITY_0'').name; '||chr(10)||
    ' elm = document.getElementsByName(elmName);'||chr(10)||
    ' for (i=0; i<elm.length; i++) {              '||chr(10)||
    ' elm[i].disabled=true; '||chr(10)||
    ' } '||chr(10)||
    '</script>';
    htp.p(l_DynJS);
    END;

  • Using radio buttons to set the value of a text field

    I have a set of three radio buttons on a form (a performance evaluation). If I select the "1" button, I want 1 to populate in the text field. The same goes for "2" and "3"
    I have not been able to code the buttons correctly for this scenario, and can't figure out how to do it.
    From a previous post, I was able to get check boxes to do what I want, but they won't really work because I can't set them so that only one back may be selected.
    Can this be done?
    Thanks!

    The information for this specific case isn't anywhere. The best that you can do is understand what triggers each of the events, then ask yourself which of those triggers are pertinent to your current issue.
    http://help.adobe.com/en_US/livecycle/es/LiveCycle_Designer_Scripting_Basics.pdf ...
    The above link contains a great deal of information regarding how to use scripts within Livecycle Designer. The section that you would be most interested in in order to learn about the available events can be found under "Events >> List of Events".
    You needed to use the initialize event so that the text field would be updated when the document was opened. This ensure that the text field has the value of the default radio button when it is opened for the first time.
    You needed to use the change event so that, when the use selects a different radio button, the text field is updated with the new value.
    That's about it. That PDF file that I link to above is a bit long, but it's a great place to get a good grasp of the basics of scripts.
    If you have any further questions, feel free to ask. =) Have a good one.
    - Scott

  • PAGE RADIO BUTTONS and APPLICATION ITEM VALUE

    I have several pages that use same radio button group that permits filtering the report query (of course on each page, it is a page level radio button item).
    I created an application item value to hold the last used value of a radio button item.
    On login, I would like the application item value set to a default value.
    For a given page using the recurring radio button group item,
    I would like the radio button item value set to the application item value on entry into a page.
    I would like the report to use the application item value on entry to a page.
    I would like the application item value be updated anytime the page level radio button item value is changed, so that when you move to another page,
    the next radio button group and report can use the last selected radio group button value.
    I am trying to use a variety of solutions in COMPUTATION and CONDITIONAL COMPUTATION... to include use of set_session_state procedure, and I am not getting desired result, partial success, but not complete.
    Can you have a computation item that is only for initialization of the report and radio button group on page entry?
    And a separate computation item that senses user selection of another radio button, updating the report, and updating the application level item?
    Help requested. Thank you.
    Would be nice to have application level objects, like radio button groups.

    Created Page 0
    Created an HTML region in COLUMN 2 and SEQUENCE 10.
    Selected under region CONDITION:
    Current Page is contained within Expression 1 as comma delimited list of pages
    in the EXPRESSION 1 provided the requested comma delimited list of pages that I wished the HTML region to appear.
    Created the radio button group item P0_RADIO and assigned to Page0 HTML region.
    Selected under item CONDITION:
    Current Page is contained within Expression 1 as comma delimited list of pages
    in the EXPRESSION 1 provided the requested comma delimited list of pages that I wished theradio button group to appear.
    In SHARED COMPONENTS I created an APPLICATION COMPUTATION
    In the computation I created a PL/SQL function to initialize the radio group
    BEGIN
    IF :P0_RADIO IS NULL THEN
    RETURN 'A_ALL';
    ELSE
    RETURN :P0_RADIO;
    END IF;
    END;
    'A_ALL' being the default value for :P0_RADIO
    Radio group appears on the desired pages, is initialized to the desired default value, and works properly on each page.

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

  • Creating a form with radio buttons that users can fill, save, and e-mail back

    Hi all,
    I am new here, so please forgive me if this answer has already been answered. I have been looking around and still have not been able to find an answer.
    I have created a pdf in InDesign and opened it in Acrobat to create a form out of that existing PDF. The form needs to contain radio buttons and text fields. When I save it to test it out on Adobe Reader (for the typical user), it says that I am only allowed to save it in its original form (without any of the changes) thereby making this form useless (I do not want users to print it out; I'd like them to email the entire PDF back to me).
    I've looked online and found some answers saying that I would just need to enable commenting, but when I tried that, I could no longer select any of the radio buttons in Adobe Reader.
    Any suggestions?
    Thanks in advance.
    I'm on a Mac using Adobe Acrobat 7 Professional.

    You won't see that in 7. It didn't exist until Acrobat 8. Though It would work with PDF's opened by Reader 7.
    The only choice you have is connacting someone at Adob coporate and finding out how to sign up to a Service they have that will llow you to do that.
    Caution: its very, very expensive and unless  your fortune 1000 company you can't afford it.
    OR you could upgrade to Acrobat 10 (if you have a Machine capable of running it - Intel Only) or Acrobat 9 (PPC and INTEL).
    Note the feature they speak of only allows for 500 instances of any one PDF set up to do so.

  • Is there a way to present two or three radio buttons that will open up new fields based on the radio button pressed?

    What we want to do is ask our new clients their preferred method of billing: Credit Card, Invoiced, ACH.
    If they choose Credit Card, credit card info fields will show up.
    If invoiced, Billing Address field shows up.
    If ACH, bank account and routing number fields show up.
    Is this possible to do?

    Yes, this is one of the features of web-based forms in FormsCentral. You will use conditional elements (show/hide logic) to allow certain elements to hide or display.
    See this page for more info: http://helpx.adobe.com/acrobat-com/formscentral/help/edit-field-properties.html#conditiona l_form_elements
    You create all of your fields: Credit Card, Billing Address, and Bank routing and account number fields, and then only have them show up as a condition of which of the radio buttons the user selects.
    I hope this helps,
    Brian

  • Dynamic Radio Buttons that offer dynamic output

    I am wondering if coldfusion has the abilty to perform the task
    I am looking for. I want to list radio buttons
    as options, and depending on which radio button the user selects,
    they are then offered a series of other radio buttons.
    Is this something coldfusion can handle, or would a different language
    be better suited for this?

    You are looking for a javascript solution.  CF or any backend can handle
    dealing with the data, sending back and forth data about what radio button
    list to show, etc easily.  But if you want no browser refreshes, then you
    need to look into javascript to display the list, use ajax to poll for
    refined radio button options, then display.  I recommend looking into jquery
    and CF.  CF can get the options from the database for you and serve to
    jquery which is run int he browser which will dictate how to display it
    nicely.
    http://api.jquery.com/radio-selector/
    <http://api.jquery.com/radio-selector/

  • How to Pass the Value of a Textfield as c:param to a Link using c:url?

    I must have done someting wrong.
    I tried to pass the value entered in a textfield:
    <html-el:text property="searchFirstName" />to a link this way:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>and in my action class, I have
    String firstName = request.getParameter( "searchFirstName" );I tried to print out the firstName, I got a blank!
    Please advise what went wrong.

    Further to what I have posted, I did pass some fixed values in my link. They are picked up. Let me explain:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="sortKey" value="firstName" />
        <c:param name="orderKey" value="ASC" />
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>
    <A href=' <c:out value="${ascFirstName}" /> '></A>The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. I got a blank when I write it out using System.out.println in my action class.

  • How to navigate to specific radio button of a single radio group.

    Hi
    i have a radio group named rdo_grp, in that radio group i had 3 radio buttons named rdo_a, rdo_b and rdo_c.
    Now, when forms executes and user navigates from any text item to above mentioned radio grp, the cursor implicitly goes to first radio button ( i.e.rdo_a).
    But i want to navigate the cursor to second radio button (i.e. rdo_b) when cursor navigates from any text to radio grp.
    please help.
    Onkar

    The focus is given to the radio button that represents the value of the radio group - i.e. the cursor goes to the selected radio button, not necessarily the first button in the group. To force navigation to a particular button, I think you will have to change the value of the radio group. I don't know if that's desirable, but it could be done with a WHEN-NEW-ITEM-INSTANCE trigger on the radio group:
    :rdo_grp := <value of rdo_b>;

  • Passing radio button to servlet

    here is code from a jsp.... i know im in a servlet forum because this information is SUPPOSED to pass to a servlet.
    <% int count=0;
    while (res.next()) {
    %>          
    <tr><td>--> <input type=radio name=rg1 value="+<%= res.getString(4)%>+">
    <%= res.getString(1) %></td><td><%= res.getString(2)
    %></td><td><%= res.getString(3) %></td></tr>          
    <%
    count++;
    conn.close();essenitally, im connecting to a mysql db and getting information and listing it out. however, i wanted to the "value" of the radio button to represent a unique id number for person. now when i submit the information, how do i get that radio button that was selected. please dont tell me:
    String select = req.getParameter("rg1")that does not work for me. i really have no way of knowing which is selected. when i want to pull that information.
    any help is appreciated.
    thanks!

    String select = req.getParameter("rg1")
    is correct.
    Probably what i would do is 'view source' on the html page to make sure the generated page really looks the way you think it should.
    BTW, it would be a good idea to quote your attribute values.

  • Is it possible to assign a value to a radio button or checkbox?

    I would like to assign radio buttons or checkboxes a value and then have the results of the buttons selected tabulated at the end of a form, if desired. Is that possible? Thanks

    Thanks for your reply and help. I appreciate it. I was able to get an export value added to the check box, but did not see and option for a radio button. But the check box works fine for now. Thanks again.

  • How can I pass a value that is selected in a dropDownlist into a java metho

    My explanation is below and heres my jsp and javascript code:
    <form action="" method="post" enctype="multipart/form-data" name="form1">
    <table width="90%" cellpadding="0" cellspacing="0" class="tblProperties">
    <tr class="trBackColor"><td class="tdLayoutTwo"> </td></tr>
    <tr class="trLayout">
    <td class="tdLayout" align="right">Student Name: </td>
    <td width="316">
    <select name="studentID" id="studentID">
         <option value="0" selected>Select...</option>
         <%=frmStudent.createList(appStudent.getStudentID())%>
        </select>
    </td>
    </tr>
    <input class="inputForm" type="submit" onClick="setValues(form1)" name="Submit"  value="Continue">               
    </td>
    </tr>
    </table>
    </form>Javascript code...
    function setValues(frm) {
         var stuID = frm.studentID.value;
         <%=appForm.setStudentID(stuID)%>
         }I need to pass a selected value from the Form Dropdown into a java setMethod() in my jsp page. But I can't seem to figure out how? I used the "setValue" javascript funtion as shown above, that passes the value from Javascript to jsp on a onClick event, but it doesn't work. I did some research on the internet and have learnt that I cannot pass values from Javascript to jsp.
    Is there any other method, may be after I hit the submit button? I need to pass the selected value from a student dropdown list to a jsp setMethod(). So for example if I select, Jon from a Dropdown list which has a ID = 5, then I need to pass 5 to the java method.
    Any Clues?
    Thanks

    hi zub786,
    you have to do following things:
    1) Get the value of the selected index using javascript methods on selection of student ID.
    2) Use hidden tag and pass that index to value of the hidden parameter.
    3) Use that parameter in your next Jsp where you want that id.
    I hope this info might help u.
    Leozeo

  • When saving form with 'Save As', losing radio button value

    I recently upgraded from Acrobat Pro 8.2 to Acrobat Pro 10.  Now experiencing the following issue:
    I have a PDF form, that is filled by an application.   With Acrobat Pro 10, if I open the completed form, and then use 'File' > 'Save As' > 'PDF', then the radio button fields lose their value.  Other fields retain their value, only the radio button fields become blank.   If I use the 'Save' option, then the radio buttons do not lose their value.
    Any help is appreciated!

    Hi,
    Can you check on your page to see if you have "reset page" process - if so, you could probably remove it. Also check on your page branches so see if you are clearing the cache for the page. If your page item is not related to a table field, you can also change the "Source Used" setting for it to "Only when current value in session state is null".
    When you submit a page, all page items should be stored in the session and would be available the next time the page is reloaded UNLESS you clear the cache for the page or the Source settings instruct Apex to retrieve the value from elsewhere - the above are the most likely causes, so check them first
    Andy

  • Numeric Value for Radio Buttons

    This should be easy for the experts:
    I got a bunch of 10 exclusion groups containing 3 radio buttons each. Every radio button got a numeric value associated, meaning the user is picking a numeric value by selecting a given radio button pretty much like the tests on the magazines in which the people pick options like "single= 10 points, married=5 points, engaged=1 point)
    In the bottom part of the same form I got a table of one one column and 10 raws sumarizing the 10 already mentioned above.
    The aim: to place the value coming from the radio button in the specific cell of the table.... in short, I want a script that allows me to palce the value of the selected radio button somewhere else in the same form, a numeric field for example.
    Thanks,

    Hi try67,
    Thank you so much for your help. Your code has brought me one step closer, I would never have gotten even this far without it!
    Initially, it was giving me and error, so I added a ")" and now it does display "Mastery", but I cannot get it to display the other two ("Acquiring" and "Practicing"), it just displays a blank space but does not give me an error.  I tried to fix it on my own by searching for some help, so I found and started playing around with jsbeautifier.org and JSLint. However, since I really don't know much about coding or syntax I hope these were not harmful. So now the code looks like this:
    // name for the text box field;
    var cTextBox = "Firm-Wide Talent Strategy Knowledge - Totals";
    // get the value of the field with the name in cTextBox;
    var sTextBox = +this.getField(cTextBox).value;
    if (sTextBox >= 1 && sTextBox <= 2) {
        event.value = "Acquiring";
    if (sTextBox >= 3 && sTextBox <= 4) {
        event.value = "Practicing";
    if (sTextBox >= 5 && sTextBox <= 6) {
        event.value = "Mastery";
    } else {
        event.value = "";
    Do you know what I might be missing that prevents "Acquiring" and "Practicing" from displaying? 
    Thank you so much again for your help,
    Chris

Maybe you are looking for