Problems auto-filling a text box

Hi,
I am trying to populate a text field with either "Yes" or "No" based on the value placed in another text field. If the value in [textfield 1] is greater than 0, I want a "No" to appear in [text field 2] and if the value of [textfield 1] = 0, I want a "Yes" to appear in [text field 2]. If [textfield 1] is blank, I want [textfield 2] to be blank. I have put the following code into the Custom Calculation area of [textfield 2]:
var a = this.getField("textfield 1").value;
if(a=="") event.value = "";
else if(a>0) event.value = "No";
else if(a==0) event.value = "Yes";
Currently if the value from [textfield 1] is greater than 0 a "No" will appear, but the field remains blank if the value of [text field 1] = 0. I'm not sure why this is. This code has worked for me before when the value conditions are different. Is it something to do with the 0?
I also want some other fields to be visible when [textfield 2] is populated with a "No" in the box and hidden when [text field 2] is populated with a "Yes". This is the code I used in the custom  validation script:
if (event.value =="Yes") {
     this.getField("textfield 3").display = display.hidden;
     this.getField("checkbox1").display = display.hidden;
} else if(event.value =="No") {
     this.getField("textfield 3").display = display.hidden;
     this.getField("checkbox1").display = display.hidden;
Again this code has worked for me for other fields. I'm thinking it doesn't work now because I don't have the Calculation Script working yet?
Any help would be greatly appreciated. Thanks!

It seems as though in my calculation code this line:
if (a=="") event.value = ""
conflicts with this line:
else if(a==0) event.value = "Yes".
I changed the values in my code so that if a>10 it would return a "No" and if a<10 it would return a "Yes" and it worked perfectly. However, when I use the above code (a==0, it just leaves the box blank. I would take out the first line of code (a==""), but I would like the box to be blank until data has been entered into the form.

Similar Messages

  • What you see is not what you get (gradient fills in text boxes do not reder

    I have a web page that has a lot of text boxes with gradient fills. Some of these render correctly in Safari but many do not. They all look fine in iWeb. I copied one that rendered correctly and the pasted version did not. (the gradient fill did not cover the entire text box) Text boxes with two lines of text seem to have the most problems. Most copied text boxes also have problems.

    Using a shape with a gradient fill and dragging a plain text box on top of it instead of just filling a text box with a gradient fill does work. However, Im not sure the problem is converting my text to an image as the html still has my text inside of tags even with the gradient fill. It seems like iweb should produce web pages that look exactly like what is shown in iweb.
    So my question is not completely answered, but I do have a work around. Thanks
    Russ

  • How do I stop Firefox from auto-focusing on text boxes?

    How do I stop Firefox from auto-focusing on text boxes? Sometimes as a page is loading, I scroll down the page...only to have the page jump back to where there is a text box, with a blinking cursor, after the page is finished loading. It is an annoying feature and I want to turn it off.

    Some pages use an onload event to set the focus to a text area or search field.
    You can try NoScript to see if that blocks it.
    *NoScript: https://addons.mozilla.org/firefox/addon/noscript/

  • My ipad is freezing problem, it indicate some text box, i cant to get into general settings, how can i reboot my ipad manually?

    my ipad is freezing problem, it indicate some text box, i cant to get into general settings, how can i reboot my ipad manually?

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • Why Does my text disappear when filling a text box?

    I am trying to fill a text box a little larger than a sheet of paper (8.5x11). I have typed my statement and copied and pasted it end to end so that my text box will be filled with a repeating statement. When the text box gets about 1/5th full I get a little red plus sign in the lower right corner to indicate overflow. THIS IS NOT THE CASE. The box is only 1/5th full and should not be rendering an over flow. Even if it was an over flow the text in the box should remain visible. Hyphenation is on. Dragging the corners to resize the box is not helpful.
    I have drawn many text boxes and used various size fonts and leading, nothing seems to help.
    Illustrator CS3
    Macintosh dual-Intel

    Something is definitely corrupt here. Not only does the text extend beyond the displayed bounding box, but double-clicking on the Characters line in the Appearance panel shows "No Selection," even though the bounding box still shows, and the text vanishes. Attempts to edit the text on the artboard also cause it to vanish.
    When I create a new type object in your document and follow your described procedure, the result is the normal, expected behavior. Have you tried to repeat this in a new document? After restarting Illustrator? After rebooting your computer? After deleting the preferences?
    Peter

  • How do I auto populate a text box if a check box is ticked in Acrobat XI Pro?

    Basically, i have been asked to create a catalogue of sorts for my organisation with a form at the end that will be completed by the end user. it will be a catalogue of books and toys that people can request to borrow from us. Its all specialist equipment that we loan out for disabled people. When they are scrolling through the catalogue i would like there to be a check box and if they would like to borrow that item they would tick that box and any other products that they would like to borrow. Is it possible to have a text box that auto populates with a list of the items they have selected. the form would be similar to the one below. it the box next to Products to borrow i would like it to add products as they tick the boxes in the preceeding pages. I would be happy to share an example document if needed. thanks in advance for any help.
    Name
    Address
    Products to borrow

    Thank you for your willingness to help.
    The problem with a drop down is that it would not present all options when printed, and some of our users will be completing this form manually (printed). All options need to be displayed.
    Here's an example:
    SELECT PREFIX:
    A12
    B12
    C12
    They can check one of the above and then based on what they select, I want the next box (a text field) to pre-fill with their selection.
    So if they select A12, the text box would automatically fill with A12.

  • Problem with bullets in text boxes

    Hi,
    I haven't seen this problem written up anywhere but I am
    having problems with my text formatting differently in text boxes
    when I've used bullets in the text. I am using Captivate 2.
    So here's what happens:
    If the text caption has a bullet
    anywhere in the body, when I publish my captivate course, the text
    looks like normal 12 pt Arial.
    If there is a text box without any bullets, the text looks
    like it was bolded.
    The next result is that I have two types of body text
    throughout my course.
    I went into every slide and verified that there is no other
    text formatting going on and I did find that Impact was sometimes
    in the same text boxes where I had bullets but I finally got rid of
    all the impact. However, the problem remains. Can anyone help me?
    Thanks,
    Lin

    Hi Lin and welcome to our community
    My guess here is that you are using the Transparent caption
    type. When you do this, the caption anti-aliases the text inside
    and many claim it looks either bold or fuzzy. You have two options.
    1. Use Bullets on all captions. Don't worry, you don't have
    to actually SEE the bullets. Just press Enter a few times and apply
    bullets to one of the blank lines. Then size the caption so the
    bullet part is hidden from view.
    2. Implement a trick discovered by fellow Adobe Community
    Expert Paul Dewhurst. You can see his trick by
    clicking
    here.
    Hopefully one of these works for you... Rick

  • How to auto fill unicode text in "Form" of htm file?

    many records to fill and update through web
    could I fill the form automatically by computer while there some Asian wider code ( still unicode)? ( text file is there.)
    If you have code, just give me some. Thank you a lot.

    Thank you every honest person who reply myquestion.
    I am in swjtu. You could visit www.swjtu.edu.cn.
    My mail is [email protected]
    Please give me your code. Thank you again.If you are a teacher at that school, then you must
    have an e-mail address which ends with
    @swjtu.edu.cn. Please provide such an e-mail
    address, and I will send you the codes.oh, I have no address in our school for the reason that email box is not free. If you had code you could read it and tell me the main points. That's ok. Use java is my favorite.
    Thank every body no matter what you think our target is.

  • IOS8 iPad Air (A7) Safari Auto-fill slows text entry down

    iPad Air (A7)
    iOS8
    64GB
    I am entering text into the following site (renew a subscription): http://oracle-sub.halldata.com/site/ORA000401OCrenew/init.do?{removed http query params}
    Safari auto text is severely slowing text entry (the suggested text at the bottom of the screen is cool, but seems to cause a drag)
    Aside from turning this nifty feature off, iOS8 safari seems it needs to be tuned to work properly.
    Suggestions?
    Thanks

    iPad Air (A7)
    iOS8
    64GB
    I am entering text into the following site (renew a subscription): http://oracle-sub.halldata.com/site/ORA000401OCrenew/init.do?{removed http query params}
    Safari auto text is severely slowing text entry (the suggested text at the bottom of the screen is cool, but seems to cause a drag)
    Aside from turning this nifty feature off, iOS8 safari seems it needs to be tuned to work properly.
    Suggestions?
    Thanks

  • Auto fill redundant text fields at run-time

    I have a master page with several text fields in the header. My first page of the pdf allows user to enter this info (in other fields, with javascript to copy to the header fields like this):
    ----- F.pgCover.editSiteNumber::exit - (JavaScript, client) ----------------------------------------
    F.pageSet.mpgHeader.hdrSiteNumber.rawValue = this.rawValue
    Pages 2-6 use the mpgHeader. Page 2 shows the correct header info, but pages 3-6 do not show it. If I dynamically change a header page how do I force all pages that use that header page to update... or do I need to set properties on my body pages or content areas differently?
    Keith

    Andrew Spiering,would you so kind to read my topic.I really need your help.My problem is still going on.
    Thanks!
    longxiaoshi, "Help!!!how to run at server!" #2, 8 Aug 2005 6:22 pm

  • Problem : Auto Correction when Text Messaging

    Ok so i have an iphone 4 and I used it recently on a message board forum. i wanted to respond to a user that posted something and i typed " ^^^^ yea "
    well not anytime i text message anyone and want to write "yea" it auto corrects to " ^^^^ yea"
    i want to keep auto correct on (to fix typos etc) but i dont want the ^^^^ yea everytime i want to text "yea"
    any help ????
    thanks!

    Go to Settings, General, Keyboard, Add New Shortcut and type the phrase and the shortcut you use to type the word. For example, ab would be about. You can go back and delete the shortcuts if you don't want them later.

  • How do I save preferences for automatically filled in text box?

    G'day
    I've got a popup button that lists all the external disks on my computer, and when a user picks a particular file on one of them, the path is displayed in a text field.
    If I edit the field, it's saved automatically, but how do I save/update the preference bindings without editing please?
    Regards
    Santa

    it's OK, I figured it out. For posterity...
    First define the property...
    property NSUserDefaults : class "NSUserDefaults"
    then to read...
    tell standardUserDefaults() of NSUserDefaults
    set tempDiskPath to objectForKey_("DiskPath")
    set tempDayReportDisplay to objectForKey_("DayReportDisplay")
    set thetempYears1 to objectForKey_("theYearsStrings")
    set tempYear to objectForKey_("tempYear")
    set theDayYears1 to objectForKey_("theDayYearsStrings")
    set tempdayYear to objectForKey_("tempdayYear")
    end tell
    the to write...
    on applicationShouldTerminate_(sender)
    -- Insert code here to do any housekeeping before your application quits
    set tempDiskPath to DiskPath's stringValue() as text
    set tempDayReportDisplay to DayReportDisplay's stringValue() as text
    set thetempYears1 to (theYear's itemTitles()) as list
    set tempYear to theYear's titleOfSelectedItem() as text
    set theDayYears1 to (DayReportYear's itemTitles()) as list
    set tempdayYear to DayReportYear's titleOfSelectedItem() as text
    tell standardUserDefaults() of NSUserDefaults
    setObjectforKey(tempDiskPath, "DiskPath")
    setObjectforKey(tempDayReportDisplay, "DayReportDisplay")
    setObjectforKey(thetempYears1, "theYearsStrings")
    setObjectforKey(tempYear, "tempYear")
    setObjectforKey(theDayYears1, "theDayYearsStrings")
    setObjectforKey(tempdayYear, "tempdayYear")
    end tell
    return true -- current application's NSTerminateNow
    end applicationShouldTerminate_

  • Fill a text box or other in a form with output of a select Query

    Hi
    Does anyone know if you can fill an object with an output from a select query on a form. I am trying to display a piece of data on a form , that is related to the data on the form. I do not need to edit this peice of data.
    The version of PORTAL i am using does not support forms created on views.
    Is this possible!!
    Thanks

    Hi
    I found what I was looking for at the following forum thread.
    http://forums.oracle.com/forums/message.jsp?id=471864
    Thanks to Steve Yeager

  • Auto-filling a Combo Box

    Hi everyone,
    I am working on a form using Developer 6, and I have created a list item that is being populated dynamically. The list item is a combo box. I originally used a poplist, but it did not behave the way I intended. I would like to allow the user to be able to type in the letter 'P' and display the first item 'Pan'. Then if the user types in a 'u' after the 'P' they would get another item 'Purse' displayed in the combo box. I have tried using the LIKE% function with no success. Has anyone been successful doing this? If so, what does the code look like? I would appreciate any help you can give me.
    Thanks in advance.

    It seems as though in my calculation code this line:
    if (a=="") event.value = ""
    conflicts with this line:
    else if(a==0) event.value = "Yes".
    I changed the values in my code so that if a>10 it would return a "No" and if a<10 it would return a "Yes" and it worked perfectly. However, when I use the above code (a==0, it just leaves the box blank. I would take out the first line of code (a==""), but I would like the box to be blank until data has been entered into the form.

  • Having a problem working on a text box in my custom form, can you help me?

    I am making a custom form and I have reached a problem. The textbox that I am working on has gone light and will not let me edit it at all. I have tried to delete it and start over but it is stuck and I don't know what to do?

    Are you still having this issue? It sounds to me that you "cut" (ctrl+x) the object. You can get out of the mode by pressing the "ESC" key on your keyboard.
    Gen

Maybe you are looking for