Text field - fill color

I develop a form with a drop-down list and several text fields. Based on the user select on the drop down, other fields will change as mandatory or read-only

To improve ease of use, I want to grey out those not required / only fields in reading.

I'm doing it with the following script:

this.resolveNode("textField1").fillColor = "195,195,195";

However, legend and input area are gray out.

Is there any script which will be gray on the box only?

Hey Elvis Giff,

Stefan cameron shared some good examples on this.

http://Forms.stefcameron.com/2008/06/13/shading-the-caption-not-the-entire-field/

http://Forms.stefcameron.com/2008/03/14/field-background-color-fill/

Kind regards

Rous

Tags: Adobe LiveCycle

Similar Questions

  • Text field - value color. New user.

    I am painfully self-taught and using LiveCycle Designer ARE 2 on Windows 10.  I am designing a pdf form (via the rights of readers, users can enter text) and everything that has happened - pdf exactly necessary functions - but I need to deal with some visual aspects and here's the hitch...

    I want to the values area of some areas of text entry to fill with a color, all leaving the entire text box & legend area white/no fill.  After a cargo of experimentation, I thought I had this figured out using the following:

    In fashion designer...

    Select the desired text field > tab > field tab > appearance > select custom in the appearance menu > in the custom appearance window that appears I then select background fill > Style = solid.

    Can I choose a color from the first of the two paint bucket icons (the one on his right is grey out), click OK and - presto - the values area has a fill Uni in the color I chose. Exactly what I want.

    The problem is when I leave the designer view and select the preview PDF tab, my colors are gone and view what were their default values. Return to the designer view and the colors are if I put them. Huh?

    I would appreciate help with this.

    Thanks in advance!

    Try to uncheck "highlight the existing fields.

    In the Viewer tab if you press the "Esc" key, you'll be up the toolbars it would look in regular acrobat. Then in the header/purple on the top toolbar right you have the choice to highlight fields. Which will highlight the fields by using the same kind of coloring/properties options you have changed earlier so that the choice "replaces" your colour of the fields if that makes sense.

    If my answer helps please mark as correct and do not hesitate to ask anything else. I'm happy to help if I can

    Mattias cordially.

  • Dynamic text field changes color but the bullets are not html text.

    I am tarea to use a dynamic text field to shoot in the html text that contains a bulleted list. Easy enough, that works. But don't take the balls on the color assigned to the field. I tried to put in the html text and also using NewTextFormat and no work. Someone can help me. This should be a simple solution, but I'm not... I want my text and bullets to both be white.

    Simple code below. Using html text inside the document flash and presence of a PivotTable field on the screen named txt. Code should turn text and green balls, but it does not work, only the text goes green

    This.txt.html = true;

    var my_fmt:TextFormat = new TextFormat();
    my_fmt. Color = 0x00FF00; hexadecimal value corresponding to green

    this.txt.htmlText = "< P > This is the first paragraph < /P > < BR > < UL > < LI > Bullet 1 < /LI > < LI > < BR > Bullet 2 < /LI > < LI > < BR > Bullet 3 < /LI > < LI > < BR > Bullet 4 < /LI > < LI > < BR > Bullet 5 < /LI > < /UL >";
    this.txt.setTextFormat (my_fmt);

    Thanks for any help you can give me.

    works for me:

    create a new fla and add a textfield, the name of your instance and copy/paste the code that I have proposed.  any problem?

  • Removal of specific blocks of text without fill color

    I was wondering if someone might be able to tell me in simple in javascript to traverse the entire block of text in my document that are NOT filled with the following RGB values...

    fillColor.red = 11

    fillColor.green = 142

    fillColor.blue = 196

    Windows 7 64 bit, CS4

    I changed my concept to make it more dynamic for my purpose. I check to see if the fillColor typename is RGBColor or GrayColor. I'm removing everything GrayColor. Thought I'd share the code for the community to use as you wish. I hope this helps someone!

    var doc = app.activeDocument

    var doc.textFrames = allText.

    var readFillColor = [];

    for (i = 0; i

    {

    textItemsRange = .textRange [i] allText.

    readFillColor [i] = textItemsRange.characterAttributes.fillColor

    If (.) ReadFillColor [i] TypeName is "RGBColor")

    {

    Alert ("found RGBColor")

    }

    else {}

    Alert ("found GrayColor")

    textItemsRange.remove ();

    }

    }

  • 2 different text fields filled according to Drop down selection list

    Hello

    I am creating a form where a phone number is in a text box, an email address is filled and in another area of text, from a selection in a drop-down list. I use CS3.

    Any help would be appreciated.

    in the event from the drop-down list output put something like (in formcalc):

    If ($.rawValue == 1) then

    Phone number = '12345566. '

    email = "[email protected]".

    ElseIf ($.rawValue == 2) then

    Phone number = "67890".

    email = "[email protected]".

    endif

    (Make sure you have the ' specify values of element checked for the drop-down list object > link ")

  • Text field: Add the fill and border color to the text field

    Why I can not get my fields to be filled with a color or a colored border?
    This is my first form and it is quite complex, with formulas math etc, (which is great!) but I am wrestling

    in this last two text fields little I want to stand out from the rest of the form, because they

    are the boxes, Submit and Reset.

    If you get a color picker when you try to set the background and border colors, make sure that the check-box Transparent is not checked. If it isn't her, can you describe exactly how you are trying to change the colors?

  • Background color for the calculated text field

    Hello

    I have a text field which is calculated according to a formula that shows "RED" "GREEN" or "YELLOW".  I would like the field to automatically color itself based on such calculation.

    I tried to enter the following formula in the output * (JavaScript) events, but because the user is not really striking in the field, it will not work and the field remains white:

    VNAME var = this.somExpression;

    var fieldObj = xfa.resolveNode (VNAME + "#textEdit.border.fill.color .ui.");

    If (this.rawValue == "GREEN") {}

    fieldObj.value = "0,255,0;

    }

    ElseIf (this.rawValue == 'RED') {}

    fieldObj.value = "255,0,0";

    }

    ElseIf (this.rawValue == "YELLOW") {}

    fieldObj.value = "255,255,0;

    }

    else {}

    fieldObj.value = "255,255,255";

    }

    Any help is greatly appreciated!

    ~ Lisa

    Lisa,

    The code is supposed to be placed in the calculate event and not on the Exit event. Given that this field is read only the user never enters whatever it is in the field then the Exit event is meaningless.

    Here is the improved version of the calculate event code...

    Change the scripting language Java script and paste the code below into the event to Calculate the global field (RedYellowGreen1).

    Var score = TotalScore.rawValue;
    strColor var = "";

    If (Score == 0 |) Score == 1 | Score == 2)
    strColor = "GREEN";
    If (Score == 3 |) Score == 4 | Score == 5 | Score == 6 | Score == 7 | Score == 8 | Score == 9 | Score == 10 | Score == 11 | Score == 12 | Score is 13)
    strColor = 'YELLOW ';
    if(score>=14)
    strColor = "RED";

    Switch (strColor) {}
    case "GREEN":
    This.Border.Fill.Color.Value = "0,255,0;
    break;
    case "RED":
    This.Border.Fill.Color.Value = "255,0,0";
    break;
    case "YELLOW":
    This.Border.Fill.Color.Value = "255,255,0;
    break;
    }

    this.rawValue = strColor;

    Thank you

    Srini

  • Field when you have filled color change

    Say, there are two types of fields of color-greenText1 and redText2. If the user fill out redText2, redText2 will become greenText1. So, what's the code for this?

    Hello

    I'm not sure if you want to, but I guess you want the field as red until it has text inside and then you want to be green, to which cases you may have a validation script something like

    If (event.value! = "")

    {

    event.target.fillColor = color.green;

    }

    on the other

    {

    event.target.fillColor = color.red;

    }

    Hope this helps

    Malcolm

  • the font color for part of a text field

    Is it possible to use code to change the color of the font for part of a text field?

    My situation as well.  The user enters a description string.  Leaving a script hides the user field and combines two static strings to display the string combined in a (now visible) 'official' description of its value field.

    Is it possible to include the tags any for only the text of the user in the color red? Then the text in a field would seem Red Black Black?

    Sorry if this is a matter of repeating.

    Hello

    Why not use floating fields?

    You can easily design a text with 3 floating fields.

    Two of them you fill with strings from a script and the other with the value of the users description string.

    The advantage of this method is, you can use different colors, fonts, sizes, etc. for each floating field!

    1 entry

    2. the result

    Here's an example form:

    https://Acrobat.com/#d=rnJO2rOd4FvAn4izbPwN-Q

  • dynamic changes to decimal or text fill color box

    I already asked a question on how to programmatically change the background color of just the object checkbox box.  The code (which was working fine) was:

    xfa.resolveNode("form1.page1.cb.ui.#checkButton.border.fill.color").value = "255,255,0;

    Now, I need to do something similar for other types of objects.  In particular, I need to change the color of a decimal field and a text field.  I tried to find similar tags in the XML source that could give me some advice.  I tried the following (based on my review of XML) for the decimal field, but it did not work:

    xfa.resolveNode("form1.page1.cb.ui.#numericEdit.border.fill.color").value = "255,255,0;

    and

    xfa.resolveNode("form1.page1.cb.#numericEdit.border.fill.color").value = "255,255,0;

    No indication on how I'd change for the decimal and text fields?

    Thank you
    Emily

    Hi Emily,.

    You are on the right track. Check the XML source will highlight the syntax to access this property.

    Over time, I adapted the script to include collecting the SOM of the object and use it in the script. This way if the name of the object (or the name of the subform) is changed, so the script still works. The only thing you need to change is the reference of the user interface based on the object type.

    The numericEdit will work on decimal objects and textEdit will work on text fields.

    var vName = this.somExpression;
    var fieldObj = xfa.resolveNode(vName + ".ui.#textEdit.border.fill.color");
    fieldObj.value = "255,255,255"; // white
    
    /* Check the type of object and change the .ui reference:
         Date field =      #dateTimeEdit
         Dropdown =      #choiceList
         Checkbox =      #checkButton
         Text field =      #textEdit
         Numeric field =     #numericEdit
    */ 
    
    Good luck,
    
    Niall 
    
  • How to fill two text fields based on a simple drop down list

    I'm trying to set up a form so that the two text fields will fill with a text by default (separate for each text field) at the same time.

    Here is a screenshot of the fields.

    Thus, for example, if I select Utah in the drop-down list in 'State', ' OH Fund Center "is automatically filled in with APWSWR4949 and"OH WBS"is automatically filled in with WR49.73.0003.

    I have a similar script for down text in form fields, but the script does not work.  I tried the following script:

    var v1 = this.getField("RecState").valueAsString;

    If (v1 == "Utah") event.value = APWSWR4949;

    else event.value = "";

    However, it would not AutoFill OH Fund Center area.  And I have no idea how complete both fields at the same time.

    Any help would be greatly appreciated.

    Thank you!

    Crystal

    Strings must be enclosed in quotation marks. So change your code:

    var v1 = this.getField("RecState").valueAsString;
    if (v1=="Utah") event.value = "APWSWR4949";
    else event.value = "";
    

    If it works, then you can use code similar to your other field.

  • Fill in the text field when TWO radio button is unchecked

    Hello

    I don't know anything about javascript and need help.  I have a photography contract I want to offer a "discount package" of $50 when the two services will be used.  1 service is 'Photography coverage' and Service 2 'Photo Booth Rental'.

    Text field 1 = subtotal (calculates the values of checkbox and radio button)

    Text field 2 = discount (it's where I need help.  I would like this automatically filled with $50 when my default two boxes are not selected.  But only when the TWO are not selected)

    Text field 3 = Total (which has a basic calculation of the Subtotal-Discount)

    The services of two by default (it's done on purpose, I checked from the beginning) are both set to the '0' values to keep the subtotal $ 0.  If the client will use a service (which means one of the default selections will be selected), then there will be no discount, but if they decide to use photography and the cabin, they save $50.

    Can someone please help me to write a script for the text field, Discount calculation, to accomplish what I ask?

    Untitled-3.jpg

    You can use something like what the calculation script custom field discount:

    Event.Value = (this.getField("Service1").value == 0 | this.getField("Service2").value == 0)? 0: 50;

    Simply adjust the field names in the code to match the real in your file.

  • When a box is checked, fill a text field with a value

    I don't know that it's simple; However, I am very new to acrobat and javascript.

    Here's what I want to do:

    I have a checkbox field and a text field. If the checkbox is turned "on" I want to fill the text field with a specific numeric value.  If she isn't 'unchecked' there is not value or value 0.  Any help is appreciated.

    Enter this code in the custom of your text field calculation script:

    This.getField("CheckBox1").value = Event.Value == "Off"? 0: 1234;

  • Creating a page of my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Hey, I would like to create a page on my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Another thing I need to allow users must be able to upload their own graphics to the pre-assigned fields. Thank you please advise me on how I would go to this topic.

    Nothing to do with the Muse. You need a system dynamic as Joomla, Wordpress, Drupal and so on. Otherwise, there is no way to store your information.

    Mylenium

  • Is it possible for someone to insert a logo when you fill out a form to fill out? I'm looking for all the options under the button 'add a text field.

    I have created a form to fill out that is a contract, but I need a way for the person who is to fill the form to insert their logo.  Is it possible for someone to insert a logo when you fill out the form to fill out? I'm looking for all the options under the button 'add a text field.

    It is not possible within a text field, either. If they have Acrobat, they can use the built-in under Tools - editing content Add Image tool.

    If they drive XI or higher, they can use a button form field you will need to set up for them, but the image must be in PDF format.

Maybe you are looking for

  • Why won't my apple mouse scroll in the finder

    With the help of the iMac 27 inch 2011 and last EL Cap. My mouse Apple will not parade in the finder, but seems to scroll in other applications. This is a recent flaw, I can't find a string, I maybe changed to cause this irritating bug. Any suggestio

  • How to disable sound in firefox?

    I want to turn off all the sounds I have firefox (flash and everything). How do I do that?

  • Best Windows 7 for school / game?

    Hey, I'll get windows 7 and I wonder which version would be the best for the games work / school? Thank you.

  • Paper size

    Hello Can I use the roll paper size A3 to A0 plotter to print A3 drawings? Thank you

  • Uninstall the informant of refund

    I installed sort of informant for a refund and cannot uninstall it. I tried the programs and features, but it doesn't seem to be there. It seems always just after starting a computer asking my login information. I have never connected to the program.