Fields of text format based on radio button selection

(Beginner) I have a form, which one party uses five 5 choice of radio button.  If "Choice5" is selected, I want to field 'X' (in the form) to display a red border.

I need assistance with the JavaScript code for this action.

Thank you!

A minor change...

"this.getField("X").strokeColor = event.target.valueAsString =='choice5 '? Color.Red: color.black;

... and it worked.

Gilad thanks D!

Tags: Acrobat

Similar Questions

  • Adobe Java Script to change the field of reading to write based on radio button selection

    I created a form the question asked is "Do we have a credit limit?" the user can select a Yes or not by using a radio button.  If the user selects Yes we do not have a credit limit that I want the text field "CreditLimitAmount" to change the read only entry.

    Here is my code, but it does not work, someone would be able to see what I'm doing wrong?

    GetField ("CLYes"). Value
    If {(event.target.value==="Off)"}
    f.ReadOnly = false;
    f.fillColor = color.white;

    } else {}

    f.ReadOnly = true;
    f.FillColor = Color.Gray;
    }

    You have it backwards. Use this code as your radio buttons script two MouseUp and remove the code that you have applied to the text field:

    var f = this.getField("CreditLimitAmount");
    if (event.target.value=="CLYes") {
        f.readonly = false;
        f.fillColor = color.white;
    } else {
        f.readonly = true;
        f.fillColor = color.gray;
    }
    
  • Status field change based on Radio button selection

    I have a form that has a text field 'Status' and several radio buttons named: submitted for approval, approved, not approved, items received and distributed.  I need the status of self serve option button is selected.

    For example, when the 'Submit for approval' option button is selected, I want the State to be "Submitted for approval", then when the 'Authorized' option button is selected, I want to be "authorized" status and so on.  How can I do this?

    Thank you!

    Here is one approach.

    Steve

  • Change the background fill color based on Radio button selections

    Hello

    I am very new script in LC, so I hit a wall on my last form. I am creating a form with a scale of 'leikert-like', however one of the stipulations (from my boss) is in this context of buttons are to be filled based radio which button is selected.

    For example, Question 1 has 4 radio buttons to choose: poor, fair, good, great. If the person completing the form selects poor, I wish the poor to fill background color. If someone chooses right, I would like to than this background color to be filled, as well as the background of the poor. Good selection would fill the colors of good, fair and poor; and selecting the big would fill the four colors.

    Someone has ideas of how / if possible? In my first tests, I got the button itself to change the colors, but not the background fill (which can be changed manually on the border palette).

    Any ideas would be much appreciated. Thank you!

    Aaron

    Here is the code that you can use in the event of modification of the ExclusionGroup (title default RadioButtonList) object. It is the parent of each individual option button object.

    for (var i=0;i
    

    This also assumes that the value of each option button is sequentially numbered from 1 to however many boxes option you have.

    Now, here's the thing. I'm assuming that each radio button has a different color. You might code for the colors yourself in JavaScript, but I manually chose the colors through UI Designers. Once all the colors of radio buttons have been defined, select a radio button and go see > XML Source. Where we see the element, add the presence of the attribute = "hidden". Do this for each option button. Here's what I mean:

                      
                      
                         
                          
                            
                         
                      
                      
    

    Kyle

  • Nested panel based on radio button selection

    And I'm back.

    In Guide Builder.

    I have a group of 4 buttons radio buttons. When "delete" things, I want to 'user id' display (that's its own Panel).

    That's what I did and it doesn't work:

    Panel 'user id' is defined in nested optional

    in the display panel rules specify for this Panel - apply the display rules, add a rule.

    under group or field guide, I chose the list of radio (the one above with 4 options) button.

    condition of game to 'equal '.

    Set the value to 'delete '.


    When I saw the guide and choose 'Remove' user id Panel does not appear.

    Who am I lack/hurt?

    Replied to your private email.

    Paul

  • Achieve an image based on Radio button selection?

    Hello

    I created a movieclip which is simply a question and the user chooses from a list of option buttons

    I created this and it works fine, but I can't understand how to set up a button "Next" or "Submit" button that, according to the choice of performed radio button, the user accesses a specific image or label.

    I bought the Adobe Flash CS5 bible, but it seems to be little information on Radio control buttons, only how to put in place to test.

    any help would be grateful.

    Look at the the RadioButtonGroup class selectedData property.  You can probably use that in any function call so that you use the property of the value assigned to the RadioButton selected.  The property value you assign to the RadioButton (s) can be different picture that each would end by will.  So in your event handler for the button function send, you can simply use something like: gotoAndStop (radioGroupName.selectedData);

  • Creating summary based on radio button selection

    Hi all

    I have this 22 page form which has many choices of button radio. Please find attached screenshot.

    My requirement is to have a summary on page 23, where all default options are mentioned. Assume that if the point 1, 6. 17 208 are marked as failed, they should be mentioned on the last page with comments.

    I've browsed the forum before asking the question, however, did not find any.

    I would be really helpful if you could point me in the right direction.

    Best regards

    Akanksha

    summary.jpg

    You need to iterate over all the fields, count how many of them have the value "Fail" and then display the result in your text field.

    Iterate over the fields or the other can be done with a table containing the names, or if their names are consistent ("Item1", "Item2", "Item3", etc.) then you can use a simple loop to do.

    Edit: I notice that you want to display the actual names of the items that failed, not just their number. It's a little more complex.

    If the descriptions of each item are not saved in a text field where you could read, you need to create some kind of data model in your script that will specify the name of each item, you could use them in the summary.

  • Radio button selected user jumps to the text field

    Hello

    Is there a way to blow up a user of a radio button selected in a text field.  For example...

    1. the user will have two options of the radio button.  One option is YES and one option is no.

    2. the user must choose Yes or no (must)

    3. If the user selects YES (radio button), I want the shape of jump them to a text field to fill out additional information.

    I was able to do this with a box, but not the radio button.

    I did research online and via the forums but have not yet found a solution.

    Thanks much for any direction or resources!

    OK, with a checkbox or a radio button, you can use the mouse event to the top, but check the value is different. For the Yes option button where the value of the key (aka export value) is set to 'Yes', you would do something like:

    Script mouse upward to a radio button

    If (event.target.value = 'Yes') {}

    getField("text1").setFocus ();

    }

    Do the same for the box but use the corresponding export value.

  • Radio button selections does not save

    I'm creating a form of performance review. I have a section where employees need to rate themselves on a scale of 1 to 5. (1 = low, 2 = good, 3 = meets expectations, 4 = exceeds expectations, 5 = outstanding) I radio for each option buttons so that they are allowed to select a. However, when I go in, as the employee to complete the form and select the radio field I want, the selection does not record.

    Is there a way to make sure the radio button selections are saved?

    Or is there a better option?

    Hi kellyr19545348,

    Please save the PDF under the drive extended to allow other users to save the options they are checking.

    Open a PDF in Acrobat

    Go to file > save as other > Reader Extended PDF > allow more tools

    Thank you

    Abhishek

  • Prevent Question 2 Radio button selection until Question 1 Radio button selection

    I have a script (Javascript) messagebox to appear if the user tries to make a radio button selection to question 2, when they do not have a selection to question 1. However, the message box does not prevent the selection. the radio button is selected after the messagebox goes. How to prevent this? I tried to focus on the set of question 1 of option buttons, but it does not work.

    You could define question 2 in read-only or protected using 'access', until answered question 1.

  • Radio button selection fills the text boxes

    Another question from newbie to come!  I created a product generation.  There are four options different areas where only one option can be selected (to build the system they choose one option from each region, although only the first option area is mandatory).  I would use radio buttons to select one of the options in each area of the option and the price to fill areas of text with the appropriate price.  This will require a javascript work which is not a strong point.  Below these elements is a price total (hidden in the image below), I think I understand.  Any suggestions on how to ask this outing alternately to achieve the same result would be welcomed as well.

    Thanks in advance!

    Has created for each option button attached to it as the export price

    value, and then you can use a calculation script easy to apply this value

    to your text field.

  • change field bitmap on the focus of radio button

    Hello

    I have 4 radio buttons in a group of radio buttons. Each of the radio buttons has a picture that is linked to. I want to change the image of a bitmap field whenever a radio button got the update.

    How can I do?

    Thanks in advance.

    Call super.onFocus and super.onUnfocus, as well as the change of the bitmap of treatment.

  • Chart with several selections of text by using the radio button

    Is there a way to make a menu of radio button before the interactive export? My goal is to have a graphic with a text box inside that when page header dropped into Indesign from a library opens a menu of radio button that I can choose a category to the page. Looks like a bit of scripting and I don't know where to start or if there is an easier way to get the end result.

    You will need a script. This lot will be able to help.

    Scripting InDesign

    The script will have to set some kind of event listener that detects when a library item is placed. Where you will have the different texts depends on how many and they are likely to change.

    P.

  • Visible field according to a choice of radio button

    Hi all

    I have this form where I have a group of yes/no radio buttons. I would like to a numeric field to appear only when users click Yes. When the form opens, or if users do not set it to Yes (not default) field should not appear.

    There is a min and max limit attached to this field, which should only kick in when the field (limits of should not be applied when the field is hidden).

    My questions are:

    Where should I put the condition visible/hidden? In the Group of radio button or on each subform condition yes/no? I tried both, so far, but it did not work.

    The script I've tried is (at the exit event of the Group of radio buttons):

    If (this.rawValue == 2) {}

    ... RightDetection.ChoixYesNo.DetectionDelay.presence = "visible".

    }

    else (this.rawValue == 1) {}

    ... RightDetection.ChoixYesNo.DetectionDelay.presence = "hidden".

    }

    The limit min/max used to work before, but since I started playing with this area, I now have an error on the first bracket. Could someone tell me why?

    The limit script is as follows:

    If (this.rawValue < 1)

    {

    xfa.host.messageBox ("specify at least 1 in this area", "Warning", 1, 0);

    xfa.host.setFocus (this);

    }

    If (this.rawValue > 365)

    {

    xfa.host.messageBox ("specify in most of the 365 in this area", "Warning", 1, 0);

    xfa.host.setFocus (this);

    }

    Thank you very much in advance for your help.

    Why not not just the value of the type field user entered - required

  • can not read the text of the element (radio button)

    I am developing a Flash quiz. Several questions have several items of choice with text under each option (button). The text is visible that I see the movie, but when I publish it, the text disappears. all I see are radio buttons with nothihng under them. I use the standard radio button component. I develop the quiz in Flash CS3. I adapt it one that I developed in Flash 8. Option buttons worked perfectly in the old quiz.

    Ideas anyone?

    The answer is this: I had a few scripts of style on the first image that I had forgotten about, the following:
    _Global.style.SetStyle ("fontSize", 8);
    _Global.style.SetStyle ("fontFamily", "Arial");
    _Global.style.SetStyle ("IncorporerPolices", true);

    When I commented on these stars, the text began to show once again. Donkey, your answer may lie in these global statements of style too - maybe add a bit to define and incorporate the police?

Maybe you are looking for