Change the background of a text field when a checkbox is checked?

Hi,
I'm new to Adobe JS, having done some browser scripting previously.
I'm making a form in which I would like to change the background of a text field to bright yellow (RGB code 220,220,0) when a corresponding checkbox is checked?
I have a checkbox named chkCD56, with an option value set to 1.
I have a text field named CD56 with a transparent background.
Can someone help me with the JS code?
Thanks.

Hi
To make your number filed in Red :
Right click on the field and go in format field click on Font tab and go in Color formula editor and give the following formula :
If Sum(fieldValue} < 0 Then CrRed else CrNoColor
Now go in Style formula editor and give the following :
if sum() < 0 then Critalic
This will make your field red and italic when it is less than 0
Thanks,
Sastry

Similar Messages

  • Changing the background of a text field in adobe interactive forms

    Hello All,
    Is there any way to change the background colour of text field in interactive form dynamically.??
    Thanks,

    Naresh,
    Change the language to JavaScipt in Script Editor of LiveCycle Designer and use the following code to highlight the area of TextField where R,G,B means that you have to give the RGB values of the color you want.
    <YourTextFieldName>.border.edge.color.value = "R,G,B";
    For eg:- If you have a textfield with name TextField1 then this will highlight the TextField1 area in red color.
    if ((TextField1.rawValue==null) || (TextField1.rawValue==""))
      TextField1.border.edge.color.value = "255,0,0";
    You can use this on exit event of Textfield1 or at the submit button where you check the form data.
    Chintan

  • How can I change the Background in a text-field into lets say grey?

    I created a text field and now I would like to not have the background in white. I did not figure out yet how I can do this. Also the help program did not help. Does anybody know how this works?
    Thanks a lot. Many greetings!

    Oh.. all right, forget it.. I just found it myself.... just looking a little more... Thanks for your help anyway....

  • Changing the colour of a text box when the value is zero

    Hello
    I have some code in an expression that changes the fill colour of a text box in a matrix in an SSRS report.
    When the value in the year fields is greater than zero then fine it changes the colour to what I want it to be but when the value is zero then the colour just stays white.
    I'm not testing the value in the year fields but in the Tier field. It seems to default to no colour when the year fields are 0 though.
    The code I am using is as follows
    =switch(Fields!TIER.Value=1,"PaleGreen",Fields!TIER.Value=2,"Cyan",Fields!TIER.Value=3,"Beige")
    This code is in the year field textbox fill property.
    I have loaded a screenshot to show an example showing what is happening in the matrix.
    Thanks for any help on this
    Regards
    John

    Hi John,
    According to your description, you want to change the background color of a textbox when its value is greater than zero. If in this scenario, we can use the expression below to control the BackgroundColor property of the textbox:
    =iif(Fields!SalesAmount.Value>0,"Yellow","White")
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Dynamically change the size of a text field.

    Is it possible to change the size of a text field depending on the amount of text in the field?
    Thanks,
    Chad

    You can find the answer from this post.
    jimmypham, ""Shrink to Fit" - Text Field capability?" #1, 18 Jul 2005 10:36 pm

  • How do I change the background color of text in Pages quickly?

    I know that I can highight the words with my cursor, then press the little "a" in the toolbar, then select the color I want. However, I have to hihglight a ton of separate sentences in documents that have a few hundred pages.
    Is there a shortcut for changing the background behind the words to a specific color? Or is there a way to do it with just one click? I don't want to have to carefully select the color I want each time. I just need one color, and I'd like to be able to set it easily.

    Thanks, didn't even know about the styles drawer.
    In summary for others...
    Perform the background change on some text, and put the cursor on the text (click the text).
    Command+Shift+T to bring up style drawer.
    Click and hold the "+" button and click on "Add new Character Style" from selection.
    Click on the arrow beside "Include these character attributes."
    Deselect all of the attributes except for the "Fill."
    Change the name to "Highlight Yellow" or whatever.
    Then whenever you click on it in the styles drawer, it will apply the fill.

  • How does one change the "rollover" value in text field of fillable PDF

    I have a fillable PDF, and the values displayed when rolling the pointer over a fillable text field are showing some strange values.  I inherited this form from someone who is no longer with the company.  I need to be able to change the values but can't figure out how.  I'm new to LiveCycle so any help is greatly appreciated.

    I guess you are referring to "Tool Tip" you can update those in "Accessibility" Pallet...in designer you would access this by Shift+F6.

  • How can I change the content of a text field in a PDF form with a defined variable?

    Hello all!
    First time poster, and getting pretty frustrated with trying to figure out this one issue. Here is the scenario: I am using Acrobat 10 Pro to design what is essentially a giant order form. I designed the document in InDesign, defined the various buttons and whatnot and then exported it to Acrobat to continue building the form.
    I have a Radio Button group called "conference_opportunities" which contains different options at different price points, so they are all named the same, but have different values (so that they belong to the same group and only one can be selected at a time).
    What I have done is created a "MouseDown" event on the radio button that sets a variable called "ConferenceOpportunity" which is equal to the title of the option they are picking. I then want to take that variable and display it in a text box called "Conference_Option". I am using a variable because the values of my radio buttons are all the actual prices of the option they are picking, so I can't define the value as the title of the option.
    So its an array of radio buttons, and at the bottom of the page there is the Option They Selected, the quantity (which can change) and the value (in dollars)
    I also then want to display this variable at the end of the document as a sort of summary of everything they chose to purchase as well but I imagine its the same code.
    I am not an expert Javascript person at all, so any code snippets would help greatly. I have looked over the Adobe Document on the SDK and API and have not been able to find a solution. I have also turned to the almighty google and still no luck.
    Any help would be greatly appreciated!
    Thanks Everyone

    All you now have to do is use that variable to the value property of your text field... So add this at the end of your code:
    this.getField("Conference_Option").value = ConferenceOpportunity;
    Also, I would use MouseUp, not MouseDown.

  • How can I change the background color in text box using RGB format

    Can some one tell me if Mac Pages (version 5.0) allows users to customize the background color of a text box using RGB color format?  It appears that the text color can be changed using RGB but background color is limited to a few standard colors.   Thanks

    They are just sample swatches, use the Color Picker to choose anything you want.
    Peter

  • How do I change the background picture that is shown when i start my Mac?

    On the iMacs in my school they have a different name for everyone of the after for example the band Queen and then there is a picture on the inlogg screen with queen on it. So then you log in and there is another background picture after that. I Have a macbook pro and I would like to change that "start-picture".
    Right now it´s kind of boring and grey. Can you change it somehow?

    It sounds like you're using Adobe Send for Outlook.  Correct?
    Unfortunately, there is no way to change the default text that is inserted into your message. You'll have to change it each time.
    I will pass along your request to the Adobe Send team.

  • Retaining the cursor on a Text Field when error on the field

    Hi,
    We have a requirement, where when we tab out of a text field, the data entered gets validated and exceptions are caught using array list and then thrown on top of the page.
    However, we have a requirement, that on tab out, the cursor should remain in the same field in case there are errors thrown on that field otherwise should move to the next field.
    My Approach is
    1) Capture the tabout event in PFR.
    2) If the validation returns erorr messages, do a forwardImmediately to CurrentPage
    3) Set the focus in PR and throw the exception.
    I read the discussion on the link How to set focus on a textinput/poplist using PPR
    and tried the same approach but below are my observations.
    Approach - 1) WITH FIRE PARTIAL ACTION on text field.
    Input = Invalid, then error message is thrown and I am not able to see the cursor.
    Input =  Valid  , then I see the cursor in the next text field, which is correct.
    Approach - 2) WITH FIRE ACTION
    Input = Invalid, then error message is thrown, the text in the textfield looks selected, which is the required functionality.
    Input =  Valid, then still I see the same text as selected. Here I dont want the text to be selected and want the cursor to move to the next field. This is not happening.
    Please let me know where exactly I am committing the mistake.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Jan 25, 2012 5:53 AM
    Edited by: SaurabhAg on Jan 25, 2012 6:06 AM
    Edited by: SaurabhAg on Jan 25, 2012 6:44 AM

    Can someone please reply to this. Its urgent.
    Thanks
    Saurabh

  • How to change the background color of a button when the button is emphasized

    Hi,
    I have a button that is in the "emphasized" state, I realized there is a default color "light blue" when the button is emphasized. is there any way I can change this default color? so if mu button goes to emphasized state I can control which color it should be
    I am using "Halo" for the theme, and I was not able to change the Focus color through the "Appearance Window" in Flash Builder 4
    any help would be appreciated

    Take a look at the accentColor flag of <s:Button>. It looks like you can do it there. But, it also looks like emphasized needs to be "true" and that you may need to interrupt the button's automatic update event... I've never tried to do this though. And, I imagine you only need to listen to button state changes if you want to dynamically control the emphasized color. If you just want to set a static value other than the default, it looks like setting emphasized to true and the uint of the accentColor will do the trick...

  • How can I change the caption of a text field using data?

    Hi, I've read that this is possible to do but when you have an xsd file, I'm using a preview xml data file, so there is no way to link them together, any ideas?.
    Thanks!.

    1) In Designer, Tools>Options
    2) Select Data Binding in the left pane and make sure Show Dynamic Properties is checked
    3) Select the field that you want the caption to be driven by XML
    4) In the Object palette under the Field tab you'll notice Caption is now green and underlined, click it.
    5) If your form is bound to a schema you can see the hierachy when you press the button beside the binding entry field or in your case to access the Caption attribute in your XML type> $.textField1.Caption
    Assuming '$' is your root node.
    Kyle

  • This should be easy! How can I change the background colour of my fields?

    Apologies if this has already been posted but nothing has come up via Google nor the Forum search.
    I'm sure this should be easy but it's really doing my head in!
    I have a number of textboxes, dropdown lists, etc within my form - I have set Custom backgrounds on each which are visible within Design View. However, in Preview PDF all the fields have a default blue colour and only change to my Custom backgrounds when you enter the field.
    Is there a way of removing the default colouring of fields so that it's the same as my Custom backgrounds? My Custom backgrounds are 'linear to bottom' so I don't want to just set border.fill.color to one colour.
    Thanks for any help,

    Hi,
    If you include this Javascript in the docReady event of the root node (default "form1").
    app.runtimeHighlight = false;
    This will turn off the field highlight. It doesn't prevent the user from turning back on the highlight, but it will mean that your form opens with the highlight off.
    Hope that helps,
    Niall
    Assure Dynamics

  • How to change the font in a text field?

    I am trying to recreate a file like this:
    http://www.teacherspayteachers.com/Product/Thank-You-Cards-for-Volunteers-Freebie-Editable Customizable-696763
    I originally created the file in Powerpoint, saved as a PDF, brought it into Adobe Pro XI for Mac.  I edit it in forms, and add a text form field, which inserts a blue box, with text1 in the middle.  How do I replace that with different font and size, in the above example, she has a different font in a larger size.  When I look at the properties, I am limited up to 8 point font.  I have been at this for hours now, so any help would be greatly appreciated, especially step by step.  Thanks.

    Click on each field and the choose Properties from either File menu (or if on Mac hold dow mouse button until context menu appears choose properties)
    go to Font
    choose desired size and type font,you can choose to make this the default.
    Do this with each field.
    Or if you have a lot of fields:
    while one is selected select all of them
    then go to fonts in properties
    change Font and size and make default.

Maybe you are looking for

  • Creating a new user in solution manager?

    Dear All,       How to create a new user in solution manager for creating an incident?

  • Half day processing of Leave raised from ESS

    Hi , We have the a problem in leave request  from ESS EP7 (ERP2005) How to allow half a day processing of leave request? even if i enter 4 hours in the duration field the system takes 8 hours but when i do the same from PA30 it is ok. kindly give you

  • Using an external monitor with FCP Studio v. 1.0

    I cannot get my external monitor to display my timeline editing window. I have made the right connections, with firewire from Mac to Sony HDV tapedeck, and with HDMI cable from tapedeck to LCD monitor, but the screen remains blank. The external video

  • Refresh system

    Pavilion g7  , I did a refresh of system and it wipped out 34 apps most of which came with the computer how do I get these back?

  • Workflows are not working with UAG

    Dear Support, I've developed a SharePoint Designer 2010 platform based workflow which contains 2 stages. First stage contains 'Start Feedback Process' whereas the next stage contains 'Start Approval Process'. The workflow runs manually. The workflow