Have text be visible or hidden depending on a form value

We have an automated system that sends out a ticket for a performance as a PDF. There are forms on the PDF that are filled out with the seat information, like Loge, Row 8, Seat 12. I would like the PDF to show a line of text when the Section form says "Loge", and not show the text when it says anything else. I have tried multiple javascripts I found on the Googles in the Validate and Calculate fields and none work. In fact, I never get any text to show up no matter what I do. I am thinking those scripts are for when someone is filling out a PDF and it does the validation then. This is not a form the is filled out by the end user, just emailed out as a static document.
Is this possible?
Thanks

Please realize that JavaScirpt has many variations. There is a subset that is web based, there is a set that run on your local computer, and there is the Acrobat JS extension. Google finds these types of scripts and other items like the Java language, a whole different computer language from JavaScirpt.
Many of the responders here can adjust the web scripts to work in Acrobat.
Are you getting any errors in the JavaScirpt console in Acrobat?
Without knowing how your custom application builds the PDF and if you can update the web located PDF will determine if you can modify it.
You will have to provide a lot more information to get help. JavaScript is an object scripting language, so object names are needed and the logical contents of the field.
You could try:
// custom calculation for additional field text;
// get the section name field;
// change the quoted string value to the name of the necessary field name;
var cSectionName = "SectionFieldName";
// get the value of the section name field;
var cSectionValue = this.getField(cSectionName).value;
// convert section name value to an array;
var aSectionValue = cSectionValue.split(" ");
// test for the section name of Loge - the 0 element of the zero based array for the section field name value;
if(aSectionValue[0] == "Loge") {
// display this field;
this.getField(event.target.name).display = display.visible;
} else {
// not Loge so hide the field;
this.getField(event.target.name).display = display.hidden;
You will need to change the string   "SectionFieldName" to the string name of the field in which the section data is located.

Similar Messages

  • Hidden fields in a form Dreamweaver 8

    I have a problem I can't resolve. I have with a bunch of
    hidden fields in a form. The problem I have is that some of the
    anchor points are not showing in design view for all the fields,
    just a couple show up. I have View Invisible elements in Visual
    aids turned on.
    Fields 1,2,3,9,10,11,15 don't show
    Fields 4,5,6,7,8,12,13,14 show
    Here's the code, can someone tell me what I did wrong?
    Any help will be appreciated

    Hi Max,
    This is possible in portal forms.
    The code to get the value of a field is some thing like this.
    You need to generate this javascript function using pl/sql in the Additional pl/sql Section - ... before displaying the page or ... after displaying the page.
    htp.p('
    <script>
    function myFunc(ele)
    var l_form = ele.form;
    var win;
    var val;
    var l_url = "<url>?";
    for (var i = 0; i < l_form.length ; i++){  // This is the way you traverse along all the form elements.
    if (l_form.elements.name == "<field to be refered>"){   //something like this for the field you wish to refer ==> QUESTION_RESULT.MASTER_BLOCK.QID.01
    val = l_form.elements[i].value;
    l_url = l_url+val;
    win=window.open(l_url);
    </script>
    Then call any fiels you wish to for the purpose of set or get of values.It can be even a hidden field.
    Hope this helps,contact for further clarifications.
    rahul

  • Why is my text not visible in text boxes?

    I have a set of text boxes that I have used throughout my book as little sidebars providing tips to the reader. These text boxes lay out beautifully within iBook Author. When I preview on my iPad, the text within these boxes becomes invisible. The text is still there — if I double tap on the iPad to use the search function, the text can be selected and shows up in the search box, but is still invisible.
    I am hoping this is some kind of user error on my part that can be easilly corrected. It appears to affect all two dozen tips I have inserted into the doccument. However, when I create a new text box it seems to function fine, even when following all the same steps to lay it out. You will see this in the green box in I stuck in example for the purposes of obtaining your help. (Please help! )
    All the affected text boxes were cut and pasted from the original, so perhaps I set something wrong? It's odd that the preview does not match the iPad layout.
    Here are some screenshots to make it more clear. First, the layout in iBooks Author:
    Then a screenshot from the iPad after it has been previewed:
    It may also be noteworthy that as the preview loads into the iPad, the text is visible, then vanishes as soon as the upload is complete. The small page previews on the ipad when 'zoomed out' to the overview also show the text, though when you go to the page it is still blank. Here is what the small page view looks like:

    Did you confirm the text/box is 'to the front'...on the top of everything in that same location? Should work if so.
    Yes.
    Are they any other elements that are maybe hiding there?
    No.
    Did you try another font color or font?
    Yes. Font, style and color (black, white, grey, green purple) do not appear to have any effect.
    Are the boxes anchored graphics...
    No, they are free floating but the problem persists if I anchor them.
    and is the text in a box on top of the graphic?
    No, the text is integrated. The box was made by creating a text box.
    Even with different answers, this problem should not occur — if the text were hidden behind something, it should show that way within the program and the small preview, no?

  • Form is filled on iPad then emailed.  If form is opened with Adobe Reader all text is visible, but if opened with Acrobat XI no text is visible.

    Form filled on ipad.  When opened with Adobe Reader all text is visible, but if opened with Acrobat XI no text is visible- form is blank.   Have been using this system for months with  no problems.

    That suggestion makes sense and likely works, but only if the user is on a machine that will allow them to use Reader. I'm sending this out to a lot of teachers, who are using machines either at school, or are school-issued machines, and they don't have the admin privileges to install software-- even Reader.
    so my problem is, if they are stuck on a machine without Reader, and without the possibility of having Reader... it's just not going to work because Preview can't handle these functions.
    And, since that is not an acceptable answer with what I'm trying to do... I will find another way to create/submit forms. I think there are some online possibilities I will have to make work.
    very, very disappointing and frustrating.
    Kristi

  • How make to know when the attachment file display its visible or hidden

    Hi guys,
    sorry for my english.
    In my scenario I have two button for open or close the attachment file display with the script 'app.execMenuItem("ShowHideFileAttachment");'.
    But i don't know when the attachment file display its visible or hidden or detect when the user clicks on show/hidden in the display.
    Anybody knows?
    Thanks in advance.
    ZAMPAZAMPA.

    Thanks radzmar,
    You help me a lot, but how i make to ask to pdf is it panel of attachment its open?
    I make this:
    event.target.viewState == {overViewMode:7}
    but return false all the time when panel of attachment its open and when its close.
    ZAMPAZAMPA.

  • I am trying to use motion tracking to have text follow a section of the background.The text box follows the motion path, but the text just sits there.  What am I doing wrong?

    I am trying to use motion tracking to have text follow a section of the background.The text box follows the motion path, but the text just sits there.  What am I doing wrong?

    Motion basically looks at the the source footage and it's timing (in the timing section of the Inspector) when analyzing for tracking.  Filters are basically ignored by the tracker.  Retiming actions, like time re-mapping, or retiming behaviors that are applied before the tracker should be used by the tracker.  Did you change the timing after doing the tracking?  If so this would also require you to re-track the shot.  Understanding that you found a workaround, describing the effects you applied would help to explain why you ran into problems.
    Cheers!

  • How can I have text from multiple fields on one layer, copy to one field on another layer?

    A little help please as it's been years since I've done any coding of any sort.
    So I have a 4 page document with various field types.  I have a document script that gets "TodaysDate" that works perfectly and a few other scripts as well.
    So what I'm trying to do is find a work around for the following:
    I have 3 fields - SURNAME, FIRSTNAME & dob.
    And I want what is typed into these fields to populate into 1 field.  And according to this tutorial (http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript) it's not exactly possible.  At least I think that's what it says.
    However I'm hoping that maybe I could have a Submit button at the end of that document that when clicked would copy the text from those 3 fields (that I would have on 1 layer) into 1 field on a 2nd layer.  Is that even possible??
    I'd also like to have the document Print, Save (using the text in the field on the 2nd layer as the file name), Email (using the text in the field on the 2nd layer as the subject line) and Export to a specific Excel spreadsheet. 
    I don't want much do I?
    I'm using Acrobat 9 Pro on a Windows PC but also have access to Acrobat 8 Professional.  And I'm going to want the form to run in Acrobat Reader X.
    So far I have for the 3 fields into 1 on another layer:
    function buttonClick(){
    if(buttonClick==false)
    event.value=this.getField("SURNAME"+"-"+"FIRSTNAME"+"-"+"dob").valueAsString;
    But I have no idea how to call the event.value from 1 layer to another or if any of that code above would even work at all.
    I have a script that I believe will work perfectly for the Save and Email function:
    Using the “doc.submitForm()” function
    // This is the form return e-mail. Its hardcoded
    // so that the form is always returned to the same address
    // Change address on your form
    var cToAddr = "[email protected]";
    // First, get the client CC e-mail address
    var cCCAddr = this.getField("ClientEmail").value;
    // Now get the beneficiary e-mail only if it is filled out
    var cBenAddr = this.getField("BennyEmail").value;
    if(cBenAddr != "") cCCAddr += ";" + cBenAddr;
    // Set the subject and body text for the e-mail message
    var cSubLine = "Form X-1 returned from client"; var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
    //** Send the form data as an XML attachment on an e-mail
    // Build the e-mail URL
    var cEmailURL = "mailto:[email protected]?cc=" + cCCAddr + "&subject=" + cSubLine + "&body=" + cBody;
    this.submitForm({
                cURL: cEmailURL,
                cSubmitAs:"XML",
                cCharSet:"utf-8"
    I'll work out the Export to Excel thing later as I've seen many tutorials on that.  But can I do the 3 fields to 1 thing at all?
    Please Help!!!

    Sorry Gilad.  I hope I'm not getting on your nerves (too much) but as I said it's been a while since I did any formal code. And I'm trying to do this code for a work document but I'm doing it in amongst so many other things I do for my job that it's difficult to get the time to concentrate for longer than 5 mins.
    I didn't get a chance to try that code until just now.  I guess I asked again as I thought (from what I'd read) that it wouldn't be that simple.
    So I've added that code and I get no errors.  But it doesn't appear to be doing anything either.  I've added the code like this in the Custom calculation script of a separate field I've called FileName.  And on the Button i'm using I've added:  buttonClick()
    function buttonClick(){
    if(buttonClick==false)
              event.value=this.getField("SURNAME").valueAsString + "-" + this.getField("FIRSTNAME").valueAsString + "-" + this.getField("dob").valueAsString;
    So now I'm guessing that becasue i'm not getting an error or a result that I've screwed it up still.  Have I put the code in the correct area?  Have I assigned a the buttonClick() function correctly?

  • Is there a way to have text hug an object?

    I'm not sure if "hugging" is the right word.  In document programs like Microsoft Word or Mac Pages, you can have the text hug a photo/textbox. You move the image and the text moves accordingly.  Is there a way to do this in Illustrator? Basically I have text inside of a letter "A." The texts goes behind the triangle of the middle of the A instead of around it.  So far I have been manually spacing the words apart but it is quite time consuming and it doesn't look as nice as it does below.  Anyone have any ideas? Thanks! Oh I run the newest cc version of ai.

    Select your object (e.g.: blue circle, martini glass).
    Shift Command ] - to bring to top if needed.
    Object >> text Wrap >> make

  • Is there a way to create a button to make an entire page visible or hidden in an Acrobat XI form?

    Is there a way to create a button to make an entire page visible or hidden in an Acrobat XI form?

    Note that Reader (11 or otherwise) cannot show/hide pages that are templates. Reader 11 can spawn new pages from templates and delete any spawned pages, however. It also supports spawning a template by overlaying it on an existing page.
    The UI in Acrobat 11 for making a page a template and setting its visibility is found under: Tools > Document Processing > Page Templates
    Here are some links to the JavaScript documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.1216.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_Templates.80.2.html
    Note that some of this information is outdated with respect to Reader 11.

  • I have a Macbook Pro and have just purchased a GSP hidden objects game. It says on the box that it is compatible and when I try and install it it tells me that installation has been successful. However, it then says that PowerPC games not supported. Help?

    I have a Macbook Pro and have just purchased a GSP hidden objects game. It says on the box that it is compatible and when I try and install it it tells me that installation has been successful. However, it then says that PowerPC games not supported. Help?
    No game icon appears on my desktop and I don't know what I can do.
    Really ****** off as i've not played these games since switching from a windows PC to a Mac and was really excited!! All I want is to be able to play my new game that arrived in the post today. If anyone can help I would be really really grateful....
    The game says that it needs Mac OS X 10.3 or higher to run so I don't understand what the problem is or how I can fix it!!

    beckyj3,
    the last version of Mac OS X which supported running PowerPC apps on Intel Macs was Mac OS X 10.6.8 (Snow Leopard). If you’d like to play this PowerPC game on your Intel MacBook Pro, then you’ll need to install Snow Leopard on it and boot into Snow Leopard. (Note that the last MacBook Pro which natively supported Snow Leopard was the Early 2011 model.)
    The game was almost certainly published before Mac OS X 10.7 (Lion) was released, so back then, all versions of “Mac OS X 10.3 or higher” would have supported running that PowerPC game.

  • I have text documents in my email folders which I can't open.They are PDF files and Open Office files.How do I open these documents or type additional text documents?

    I have text documents in my email folders which I can't open. They are PDF files and Open Office documents. How do I open these documents?

    These are the "out of the box" file formats that you can view on the iPad as mail attachments. If the file is not listed here, you cannot view it without a compatible third party app. What is the file extension?
    Viewable document types: .jpg, .tiff, .gif (images); .doc and .docx (Microsoft Word); .htm and .html (web pages); .key (Keynote); .numbers (Numbers); .pages (Pages); .pdf (Preview and Adobe Acrobat); .ppt and .pptx (Microsoft PowerPoint); .txt (text); .rtf (rich text format); .vcf (contact information); .xls and .xlsx (Microsoft Excel)

  • I have text appearing whenever I call up a new email format and I want to get rid of the text. Following is DOM source of selection : html id="compArea_test_i516_5171290607393724"

    I have text appearing whenever I call up a new email format. I want to get rid of the text. Following is DOM source of selection : <html id="compArea_test_i516_5171290607393724"><head> <title></title> <meta http-equiv="Content-type" content="text/html;charset=utf-8"> <style type="text/css"> body { background-color:transparent;} </style> <style type="text/css" id="styleSheet_521"> P {margin:0px;} span.mark {background:url(http://l.yimg.com/a/i/us/pim/dclient/cg504_5/img/md5/bfe4082db3a892f1c16cb9b5cf7cef98_1.png) bottom repeat-x;} span.unmark {color:"";} </style></head><body style="font-family: times new roman,new york,times,serif; font-size: 12pt; background-color: white; border: medium none; color: rgb(0, 0, 0);" vlink="#996699" alink="#0066cc" link="#0066cc"><br><div>&nbsp;</div>Name..<br>Sex...<br>Location...<div><br></div> </body></html> in English

    CSS:
    #navigation {margin-top: -3px;}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • When I'm looking at my recent text messages on my phone, and I'm on the screen where I see a list of people I have texted.  I click on a name to open up the conversation, however it is blank and doesn't show the conversation eventhough we've been tex

    when I'm looking at my recent text messages on my phone, and I'm on the screen where I see a list of people I have texted.  I click on a name to open up the conversation, however it is blank and doesn't show the conversation even though we've been texting back and forth the day before.  So my question is how can I see the conversation?

    Try the following procedure:
    Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
    Reset your device: hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss)

  • How do i delete numbers you have text

    I have been trying to delete numbers that i have text in the past and i want to get rid of now

    The number will go away if you have read all messages you got. If you did and the number is still there, try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again.

  • My "pictures" in the movie have text-I want them to scroll slowly from upside to downside-

    My "pictures" in the movie have text…
    I want the pictures slowly scroll over from upside to downside
    so that one is able to read the text.
    I made this happen before in an other I movie project, but I don't remember HOW!!!!
    Who is able to help?

    AppleMan1958 and Klaus;
    Your information wasn't usefull untill now; I understand what you meant to say. But this isn't the problem.
    Perhaps you can help me anyway:
    Here you see one of my dia's (it's an example, the most have a picture and text together)…
    perhaps you'll understand the problem now:
    the picture/dia in itself has text.
    When I made the Dutch version I succeeded to make the pictures scroll slowly from the upside untill the downside of the image, so that anyone is able to read the whole text.
    Now I'm preparing to publish the English version but I completely have forgotten HOW to get the pictures/dias scrolling down slowly in the same way.
    In my present movie they fade away or come to me from the centre of the images/pictures and in that way one can't read the text.
    I remember it was really simple to change it…but…I really can't find it back…
    I sincerily hope you will be able (even with a big smile, because I must be a dummy ) to help me!!!!!

Maybe you are looking for