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;
}

Tags: Acrobat

Similar Questions

  • 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

  • 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

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

  • command to check the tablespace is read or write mode State?

    command to check the tablespace is read or write mode State?

    SELECT status FROM dba_tablespaces WHERE nom_tablespace = 'MY_TS ';

    The State values are online, offline, or READ only. ONLINE is READ WRITE.

    HTH,

    Brian

  • Edit a script to reset the fields selectively a multiform document

    The script provided to clear forms selectively page-by-page in a multiform document.

    But the script is very limited because wants to change every page where a new page number for the variable is inserted "resetFieldsOnpage (n).

    In a document of 100 pages, it's a a nonsense task, involving several stages:

    1. go to the page
    2. Tap the clear
    3. right mouse /properties
    4. choose actions
    5. Select run a java script
    6. Modify the Java script
    7. now change the page number
    8. close

    It may be possible to have a real script assigned to the same field (duplicated in all pages) which allows that acrobat includes the used button is bound to a specific page and the clearing will only affect this one.

    Thank you.

    function resetFieldsOnPage (p) {}

    var fields = [];

    for (var i = 0; i < this.numFields; i ++) {}

    var f = this.getField (this.getNthFieldName (i));

    If (f == null) continue;

    If (f.page is p)

    Fields.push (f.Name);

    }

    this.resetForm (fields);

    }

    resetFieldsOnPage (0);

    Just call it like this:

    resetFieldsOnPage (event.target.page);

  • Java script - calculation of the quantity

    Hi all

    I have need to produce a java script to increase the option "size" of this page by the value of the quantity. So here's what I have so far, but all its bad. Can someone help me with this?

    < script type = "text/javascript" >

    function MM_goToURL() {//v3.0

    var i, args is MM_goToURL.arguments; document. MM_returnValue = false;

    for (i = 0; i <(args.length-1); I += 2) eval(args[i]+".location='"+args[i+1]+"'");

    }

    function Recalculate() {}

    size = «»

    Grand_Total = 0.00 + Number (getSelectedValueFromSelectList (document.product.size));

    function getSelectedValueFromSelectList (element) {}

    Return element.options [element.selectedIndex] .value;

    }

    document. Product.Grand_Total.Value = grand_total.toFixed (2);

    }

    function MM_openBrWindow (theURL, winName, features) {//v2.0

    Window.Open (Theurl, winName, Features);

    }

    document. Form.Size.Value = (document. Form.Size.value);

    document. Form.Grand_Total.Value = (document.form.size.value * document.form.quantity.value)

    < /script >

    http://www.milesmemorials.com/product-AF144a.html

    Change option quantity from 0 to 1 as below:

    Then it should work:

  • EasySign: what I can or cannot change the fields to fill?

    Is it just me, or is Acrobat EchoSign a hostile user to the garbage piece? I use reader 10.1.3. This is a form that I would complete and perhaps 'sign' with a TIFF of my signature, but first I have to type in some areas. Arrived at this point took me 20 minutes this morning:

    Acrobat EasySign.jpg

    (Sorry for the fur JPEG;) Forums Adobe informed me passively after that I tried to save three no-anti-aliasing 'content types' that he would only accept JPEG format.)

    If you examine the name under the section 'INFO' field, you will see three blue spots reflecting three multiple selections no region of text boxes in the list to the right. These objects are the result of my patiently left click the i-beam on my name in order to change the text that I entered in each field. Whenever I did, I would like to briefly see a blip appear under the i-beam, but he would not let me change my text. The blip, of course, was a text box of length zero being created. I persisted because at some point given, I swear I saw an arrow icon and it let me do a selection in blue on a parcel of my text, but then for some reason any when I typed nothing happened, then the apparition disappeared and I couldn't repeat it. And it is only after a few minutes, when I started to play with a right click on a text field, I discovered the "list of comments" so needless of me in frustration.

    There are now dozens of these mini boxes everywhere in the sheet (just look at how the "list of comments" has 86 entries instead of the 12 that actually contain text). But it means I can't change something when I finished a text, isn't it? If so, why not? Why is he not clear for me, a sophisticated user? Why the bizarre and unpredictable behavior? Or I'm a sort of silly, not having found the correct incantation? Maybe an Adobe firewing priestly programmers or myriads now will enlighten us all, tacitly suggesting that it's just my stupidity, because they knew the blessed Secret their first time.

    I have fairly exhaustive sought a solution to this and have so far found nothing, but maybe it's because I've budgeted only 45 minutes for this potential simple task. Am I'll have to check out this file in Illustrator, or print it out and post it?

    Twenty years ago, I was probably the first or second person outside mountain view to show the alpha of the carousel. Since that time - and despite having occupied hope repeatedly - I still can't easily fill a document online without heartache. Why can't I edit a field? What I have to do when I want to edit a multi-line field? My workaround over the years have range from every possible thing you can imagine, the scan in Photoshop or Illustrator, Quark or InDesign; in the fields of the blind and double-exposures on a printer laser. the glue; even to hack the fields the PostScript with setfonts and the movetos shows.

    I spent 40 years in the graphic arts; half of them I've struggled with Acrobat, on some products work quite complex with the features of questionable when delivery shoehorned in PDF format. When it comes to simple single-page monochrome form letter/A4 - the portable document more abundant on earth - we are now in Acrobat v10 and all I want to do is easily a form, sign and return by email and I still can't.

    Why is life so much harder now than when I could run that through a typewriter, Adobe? What you really do about it for billions? How much more precious moments of our lives that you're going to waste?

    (P.S. What difference is almost a day: hours after this - and just before submitting this article - I myself have discovered the cast with a few minutes more far experiments most already spent. Now, I can recreate the arrow and change the field. It's really not hard, but it's far from clear is the furthest thing of the good technique of the user interface. However, I know now the blessed Secret, or at least a part of it. But it does not change my position above. You can guess why, O Adobe priesthood of unbearable preachy? If it takes a programmer experienced hours to learn the combination, what makes you think to Grandma and Grandpa never go figure?)

    I have to say that a large part of the problem is due to the agency providing the form. This would have worked much better if they had taken the time to add real interactive form fields so that you wouldn't have to worry about the typewriter tool. It's actually good that Adobe provides that as an option of last resort for PDF files that look like forms. It of a little silly to provide a PDF of a form and makes it not to fill, especially since it's possible since Acrobat/Reader 3. This particular form would be easy to implement with fields.

    Regarding the file TIFF is not not qualify, it is worth looking at in more. Consider filing a bug report.

  • JavaScript how to get / change the field (object) TYPE (no access or mandatory)?

    Hello

    I would like to change or at least to get the TYPE of a field/object field

    Reason: I have a function in my script object that needs some things if the given parameter is a text field or button

    {myFunction (Object)}

    If (type is button)...

    ClassName is relative to any use. He always comes = field

    Could someone provide a code please?

    Hello

    This script could help show how to get the type of field.  I'm reasonably show that he originally site of Stefan Cameron, http://forms.stefcameron.com/, but can not find it now.  Basically if you have a 'field' then ui.oneOfChild.className will give you the type of field.

    I don't think you'll have a chance to change the field type.  I think that you need to have all the field types you want on the form and that they are visible when necessary.

    function listAllFields (node)
    {
    If (node.className == 'exclGroup' | node.className == "subform" | node.className == 'subformSet' | node.className == 'region')
    {
    for (var i = 0; i)< node.nodes.length;="">
    {
    If (node.name! = "ErrorIconSubform")
    {
    childNode var = node.nodes.item (i);
    listAllFields (childNode);
    }
    }
    }
    Else if (node.className == "field")
    {
    Switch (node.ui.oneOfChild.className)
    {
    case "button":
    Console.println ("button:" + node.somExpression);
    break;

    case "checkButton":
    If (node.parent.className is "exclGroup")
    Console.println ("RadioButtonList:" + node.somExpression);
    on the other
    Console.println ("checkbox:" + node.somExpression);
    break;

    case "choiceList":
    var oUITypeNode = node.ui.resolveNode ("#choiceList");
    If (oUITypeNode.open is "userControl")
    Console.println ("DropDownList:" + node.somExpression);
    on the other
    Console.println ("ListBox:" + node.somExpression);
    break;
      
    case "dateTimeEdit":
    Console.println ("DateTime:" + node.somExpression);
    break;

    case "imageEdit":
    Console.println ("Image:" + node.somExpression);
    break;

    case "numericEdit":
    Console.println ("digital:" + node.somExpression);
    break;

    case "passwordEdit":
    Console.println ("password:" + node.somExpression);
    break;

    case "textEdit":
    Console.println ("Text:" + node.somExpression);
    break;

    case "signature":
    Console.println ("Signature:" + node.somExpression);
    break;

    case 'barcode ':
    Console.println ("bar code:" + node.somExpression);
    break;

    by default:
    unknown field type
    break;
    }
    }
    }

  • Address book - blackBerry Smartphones change the field "synchronize using.

    Hello world

    I recently changed my primary Gmail account on my blackberry (from [email protected] to [email protected]).

    I have a problem with sync'ing with my address book.

    All of my old contacts are synchronized via [email protected]

    And now, I would have them Sync with [email protected]

    In every Contact form, I discovered there is a synchronization field to aid which is filled with the google account. Unfortunately, you cannot change this field.

    Y at - it an easy and fast way to mass - change (the field sync using) all my old contacts sync with my new gmail account?

    I tried with importers and exporters of gmail to gmail, but I lose my contacts photos. I cannot accept this solution because I have more than 500 contacts and 90% of them have an image.

    So I'm asking if someone has an idea to solve this problem.

    Thanks in advance

    Thanks for your reply.

    But I decided I'm going to do it by hand and transfer between gmail via vcf file transfer account.

    It's a real pain in the * because I know that have to redo all the links between linkedin/facebook and my address book. And also photos of contacts. It would have been very happy to be able to mass change the field "to sync using"

    There is therefore no real solution to solve my problem except to waste a lot of time by hand.

    But I'll post another topic for a question than a problem with the synchronization of contacts and photos

  • Script to change the key of win8 silently

    I need a script to change the key for win8 silently, there are hundreds of systems whose key is goinng expires soon, so I need a script that can the key Active silently without user interaction. Planning to deply the script using SCCM, any suggestions would be helpful. Thanks in advance...

    Since this isn't a scenario of domestic consumption current, you'll get best advice of experts of INFORMATICS:

    http://forums.technet.Microsoft.com

  • script to change the data type of column

    Hi gurus of the oracle.

    I have 190 tables in my database.

    I have the column type CHAR of all these tables data.

    I need to change the data type of CHAR in VARCHAR2 for all these tables...

    There the script to change the data type of all tables at once?

    Please help me in this regard.

    Thanks in advance

    Concerning

    REDA

    Hello

    There is nothing built-in to Oracle SQL to do.  Maybe your front-end has certain characteristics.

    You can write dynamic SQL statements to do.  In other words, you can write a query that the output is a SQL script like this:

    ALTER TABLE TABLE_A CHANGE (A_TXT1 VARCHAR2 (5))

    A_TXT2 VARCHAR2 (10));

    ALTER TABLE TABLE_B CHANGE (B_TXT1 VARCHAR2 (5));

    with one row for each column of type CHAR.  Notice how the first line of output for each table begins with ALTER TABLE... but the later lines at the same table.  Similarly, the last line of a table (which will be the same as the first row, if the table has only one column of type CHAR) to end with a semicolon, but other lines are not.

    Here's a way to generate and execute such a dynamic script in SQL * more:

    -Disable the features that make the output easy to read, but hinder the execution
    SET FEEDBACK OFF
    SET LINESIZE 500
    SET PAGESIZE 0

    -Create fix_char.sql
    COIL c:\some_pathename\fix_char.sql

    SELECT THE CHECK BOX
    WHEN ROW_NUMBER () OVER (PARTITION BY table_name
    ORDER BY column_name
    )  = 1
    THEN 'ALTER TABLE ' | table-name
    || "CHANGE (").
    ELSE «»
    END
    ||        column_name
    ||        "VARCHAR2 (').
    ||        DATA_LENGTH
    ||        ')'
    ||        CASE
    WHEN ROW_NUMBER () OVER (PARTITION BY table_name
    ORDER BY column_name DESC
    )  = 1
    THEN '); "
    Output END AS
    Of user_tab_columns
    WHERE data_type = "CHAR".
    ORDER BY table_name
    column_name
    ;

    SPOOL OFF

    -Turn on the features that make the output easy to read, but hinder the execution
    SET FEEDBACK ON
    SET LINESIZE 80
    SET PAGESIZE 50

    -Fix_char.sql performance
    @c:\some_pathname\fix_char

    It's good to change all the CHARIOT of VARCHAR2 columns.  The CHAR data type is nothing trouble.

  • What version of Adobe allows you to change the page on some pages orientaion and save the document with just a few of the tours pages?

    What version of Adobe allows you to change the orientation of the page on some pages and save the document (PDF) with only a few of the tours pages?

    Adobe is the name of the company, not the software as many people say. Since you want to know the exact software, it is important to know that.

    Any version of Acrobat Standard or Acrobat Pro to do this. These are commercial software (a cool weather or subscription).  The free Adobe Reader or Acrobat Reader cannot do this.

    Tip: there are two ways to turn the pages; alone will save him.

  • Need a script to change the password of admin for all the VMs (windows)

    Need a script to change the password of admin for all the VMs (windows)

    Hi LucD,

    Need your help about changing the password to root for Linux VM.

    It throws the following error when I run on Linux VM

    Invoke VMScript: 10/04/2013-16:52:02 Invoke VMScript Could not authenticate with the guest operating system by using the supplied credentials.

    Thank you

    Suresh

  • Script to change the subnet and vlan.

    Hello

    Please can anyone help with a script to change the subnet and VLANs on all the esx host in a cluster for the vmotion and management network interface?

    Thank you

    Astra

    I guess it worked because you pasted an out front, so:

    Get-Cluster mycluster. Get-VMHost | Get-VMHostNetworkAdapter | where {$_.} PortGroupName - eq "VMotion"} | {} %
    Game-VMHostNetworkAdapter - VirtualNic $_ - IP $_. IP - subnet mask "255.255.254.0" - confirm: $false
    }

    I guess that makes still out:

    Get-Cluster mycluster. Get-VMHost | Get-VMHostNetworkAdapter | where {$_.} PortGroupName - eq "VMotion"}

    2 vmknis right?

    If Yes, then it should work I think.

Maybe you are looking for