Acrobat Forms - javascript to hide/unhide text box if any one of a number of radio buttons is enable

I have a form which I am designing in Acrobat 9 which has a section where there are three questions, each with a pair of radio buttons - one for 'yes' and one for 'no'. They are in the style of a check box (with a tick). I need some help to write some code which will unhide a single field (or multiple fields if I need to use something similar at a later date) if any one of the 'yes' radio buttons is checked. So if all three radio buttons were checked, the field would be hidden but if you then changed your mind and clicked a yes button, the field would be visible.
I am new to this so any help would be greatly appreciated. Many thanks in advance! I hope that i have explained this clearly btw.

For ease of maintenance you might want to make the above script into 2 doucment level JavaScript function. One could set a return value to the result of the caparison and the other could show/hide the text field based on the result. Then a call to the show/hide function could control the show and display of the field(s) and and a call to the function for the results of the comparison could be used anywhere else and not change the field display property.
funciton Test3RB() {
// set logical result based on result of test
var bReslut = ((this.getField("rb1").value == "Y")|(this.getField("rb2").value == "Y") |(this.getField("rb3").value == "Y"));
return bResult; // return value of logical test
} // end funciton
function ShowText() {
// assume field not to be shown
this.getField("textbox").display=display.hidden;
if (Test3RB() ) {
this.getField("textbox").display=display.visible;
} // end if true
return;
} // end ShowText function
You mouse up action for each button could be:
ShowText();
And if you could test the logical value returned by the function somewhere else and did not want to modify the display field:
if(Test3RB() ){
// action for true
} else {
// action for false

Similar Messages

  • When I go back to edit the form why are my individual text boxes merging into one large text box?

    I am currently trying to create a form fillable pdf and have never had problems until yesterday.
    My individual text boxes are somehow conjoining into one large text box after I save my edits and go back to the form to make additional edits.  This has never happened before and it is messing up the entire format of the form.  Any guidance would be grealy appreciated.
    Thanks!

    Did you find a solution to your problem?  I am experiencing the same thing.  Only, the boxes will change.  One time when I go in a single word on a line will be in the same box as a word above it.  I created these text boxes in the pdf and did not import from another file.  The next time I go into the file, the word will be back in its original box and other words will be combined in boxes. The last time I went in two entire lines that were two separate boxes are not one box.  The boxes seem to merge completely randomly though the text they are enclosing are next to each other either side by side, or more frequently, above/below.  This is quite a nuisance as I am still creating my form and when I want to move words or lines, I have to copy the text box and then delete the words I do not want in each box just so I can manipulate the content into the positions I want them.

  • How to hide / unhide text baxes on button click in JSF page using javascrip

    Hi,,
    I want to hide/unhide text boxes on a button click.
    How to do it in .jspx page using javascript.

    Hi,
    refer this
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="#{lcRes['page.title']}">
         <af:resource type="javascript">
            function hide(evt){
                evt.findComponent('itToHide').setVisible(true);
         </af:resource>
          <af:form id="f1">
            <af:commandButton partialSubmit="true" id="cb1">
                <af:clientListener method="hide" type="action"/>
            </af:commandButton>
            <af:inputText id="itToHide" value="xx" label="this will hide" clientComponent="true"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

  • Acrobat 9.2.0 Update Breaks Text Box Tool, Possibly Introduces a New Security Flaw.

    Anyone have any ideas for this one?
    Once we upgraded to version 9.2.0 (This is a major security release that fixes a Javascript security flaw) our text box tool no longer works the way we want it and crashes the program.
    Try this:
    1. Open any PDF document on a  Windows XP SP3 computer with Adobe Acrobat 9.2.0.
    2. Add the 'Text Box Tool'  to the toolbar by right-clicking the toolbar and selecting 'MoreTools' then placing a checkbox next to the 'Text Box Tool'.
    3. Click the 'Text Box Tool' on the toolbar and draw a new textbox anywhere on the PDF document.
    4. Click out of the textbox to cancel typing mode, then single click back on the textbox that you just created.
    5. Right-click the textbox that you created and select 'Properties..."
    6. Under the 'Appearance' tab,
    a. Select Style: No Border
    b. Select Fill Color: No Color
    c. Check the box 'Make Properties Default'
    d. Click OK.
    7. Click the Text Box Tool again, and draw another textbox (Since there is no border you will not see it but you will still be drawing a textbox).
    8. Let go of the mouse when you are done drawing your textbox rectangle and the program will crash at this point.
    Results:
    1. "An internal error occurred." dialog box is displayed.
    2. After clicking ok the following "Microsoft Visual C++ Runtime Library" dialog box is displayed:
    "Runtime Error!
    Program: C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe
    R6025
    - pure virtual function call
    3. After clicking ok another dialog box is displayed:
    Error signature
    AppName: acrobat.exe AppVer: 9.2.0.124 ModName: acrobat.dll Offset: 000509dd
    4. The same error has occurred on all five computers that we tested the new version on.
    Expected results: A new textbox is created and you may start typing in text (This was the behavior in version 9.1.3).
    Additional Information
    At times, we need to add information to PDF files (i.e missing dates, etc). We have always used the Text Box Tool to do this with no border, and with no fill color as this is the EASIEST and FASTEST way to add information to PDF files in a precise manner. We want the fill color to be transparent so that we can fit text in between and exactly on lines easier, and so that there is not a solid background box behind the text. We want no border because a border around text that needs to go on a line looks stupid. Up until version 9.2 this procedure worked fine. Now, the program will crash. Perhaps this even adds another security vulnerability if the crash could be exploited. We want to maintain security by patching Adobe to address the JavaScript vulnerability that was addressed in version 9.2.0, however, we are not able to update our users as the new version breaks the fundamental purpose that we use Adobe Acrobat for. We are stuck with the vulnerable version 9.1.3 until this problem is addressed. Disabling JavaScript is not an option either, as we use a Java plug-in on a daily basis.
    Any thoughts would be great, I have attached screenshots of the errors.

    The question still is not answered.
    The problem continues in Acrobat 8.1.7 for Windows, even after updating toAcrobat  8.2.0. ( I can't comment on whether recent updates to Acrobat 9 fix the problem in Acrobat 9.)
    The internal error after text insertion problem occurs even with PDF documents created in Acrobat 8, i.e., not only old versions of PDF files. We have the text box insertion icon in the toolbar, and the properties set to "no color" for the box and "0" width for the text box lines, as other commentators have noted.
    The problem did not exist when Acrobat 8 Pro was installed, it was introduced by one of the updaters.
    The main reason we use Acrobat, rather than much cheaper PDF-creation software, is to annotate PDF files (including inputting data into spaces in standard forms).
    So justify the high price of Acrobat and fix the problem please, Adobe !

  • Looking to create editable PDF forms with drop downs and text boxes for use on a Mac computer and iPad. Which product do I need to purchase? Do not need anything fancy

    Looking to create editable PDF forms with drop downs and text boxes for use on a Mac computer and iPad. Which product do I need to purchase? Do not need anything fancy

    Basically you would need Acrobat. However, it is now also possible to create basic form fields using just the free Reader. In fact, I've been working on a tool that allows you to do it, so if you're interested in it please contact me privately.

  • How do you change a "row Label" in form central into an interactive text box?

    How do you change a "row Label" in form central into an interactive text box?  I need to leave some of the row labels plank so that people using the form can add some of their on labels.  Can this be done and if so how?

    I'm not quite sure I understand your question. Respondents (fillers of the form) cannot edit the label of a field.
    Randy

  • How to get multiple row values in one text box while clicking one row from grid?

    hi friends,
               i am working on flex4 web application i am using  one datagrid ,it have two records(bills),one button and one text box.
    ex:
    customername      salesrepname   receipt no      amount
    venkat                         raj                         1102          10000
    ramu                          ramesh                   1102         20000
    here both receipt no is same.now i want to select one of this receipt and click pay button which is place in outside the grid.
    now my need is after click the pay button in text box i need 10000+20000=30000,after click that button i want both receipts should be invisible...'
    how i will do this,
    any suggession,
    Thanks
    B.venkatesan

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • Acrobat 9 hangs when adding a text box

    It seems that any installation of Acrobat 9 I have come across, Acrobat hangs when adding a text box from "Forms>Add or Edit Fields".
    I may need to apply an update or two but this problem seems very consistent and reproducable.
    I plan on trying Acrobat 9 Pro on Windows XP to see if it makes any difference, but does anyone have any ideas?  OTHER than upgrading to Acrobat X?

    Textbox takes few extra seconds to establish himself, but it never hangs for me. Did you tried to click-n-drag to create Textbox?

  • Pdf form keeps overwriting it's text boxes

    I'm able to enter characters in a text box, but the same characters go in to all the text box fields in my pdf. Meaning my name is in 10 different form boxes. And as soon as i move to another text box all that was previously written is overwritten - so my email for example overwrites my name and all the other fields. It's incredible annoying. I'm not sure what to do.
    This is my first mac and I'm not sure if I'm doing something worng, but it seems like it would be pretty straight-forward.
    I'm using Preview and Google Docs in Lion and do not have acrobat pro.
    Any advice?

    Thanks for the reply George.  You're correct, this is an XFA form created with LiveCycle Designer.  Could you recommend an API and code sample that would preform the actions I've discussed above that would work on an XFA form?
    My end goal is simply to fill the template's fields, save as a new file, and then send the file to clients to view via Adobe Reader.  I've tried using ITextSharp and it filled in the form and saved it, however anyone viewing the file with Reader received the following message:
    "This document enabled extended features in Adobe Reader. The document has
    been changed since it was created and use of extended features is no longer
    available. Please contact the author for the original version of this
    document."
    Any guidance on how I can fill in this XFA form so it's viewable by clients with Adobe Reader would be much appreciated.

  • Acrobat 9: Control over font in text box

    Versions: OS X 10.8.5 with Acrobat Pro 9, latest patch.
    I am experimentally preparing a four day training course by adding my instructor information to a PDF of the slide show.  There are only 850 slides, so it makes sense to experiment with this small document.
    All is going well.  I have created some custom stamps.  Acrobat has only crashed twice, losing not more than two hours work as a result.  I am optimistic I will be good to go in 10 more days.
    I have just copied some test into a text box and it copied as black and blue text with a larger font than the standard red font that I have been seeing until now.
    It occurs to me that this implies there may be some control over the text.  I realize that Acrobat is not meant to be a document preparation tool, so I hunted around somewhat for a way to change the text box text to not-red, gave up and I have been putting up with it until now.
    However, there are implications (but no clearly stated solutions) that there is a way to change the font, size and colour of text in text boxes.
    Do you know how?  I cannot work it out, nor can I find a solutoin.  I can see that the Commenting preference pane offers Small Medium and Large text.  There does not seem to be any other control other than the style (italic, bold, superscript, subscript) that is offered in the context menu.
    Hints?  Thoughts? 

    Pryanja.
    Thanks again.  If offers a dropdown for Colour, a box for style (plain, bold italic etc) and a button marked more, but they seem to do nothing at all.  They don't change what I type, and they don't affect selected text.  Looks to me tha they just take up some toolbar space.
    Is it possible that it does not work on Mac?

  • Acrobat Pro 9, blank lines in text boxes vanish upon save

    Folks,
    Since I upgraded from Acrobat Pro 8 to 9, whenever I put blank lines in a text box, the blank lines disappear as soon as the PDF is saved.
    Here's an example:
    - Open a PDF file
    - Click on text box tool in the toolbar (or from menu Comments->Comments and markup Tool->Text box tool
    - Draw a box on the PDF page somewhere
    - Enter "First line", then hit Return twice to add a blank line below, enter "Second line"
    - Right now my text box contains two lines of text separated by a blank line
    - Hit save
    - Blank line vanishes in the text box. Now the two text lines are on adjacent rows.
    This did not happen in either Acrobat Pro 7 or 8. I've been using textboxes consistently for years without this silly behavior.
    Any suggestions? I've looked through forums and knowledge bases and such to no avail.
    I have acrobat pro version 9.0.0 running on XPSP3.
    Thanks!
    Petros

    Hello Petros,
    I figured out how to make this work, at least on my computer.  Hold CTRL key and hit ENTER.  This leaves the space.  Hope this works for you.
    Phillip

  • Using javascript to make a text box invisible by clicking a radiobutton

    hi
    my radiobuttons are for a persons title eg Mr Miss Mrs Ms and value 5 is for other.
    when i click other i want a text box to appear that a user can write in, and if the user changes their mind after writing in the box i want the text box to disappear
    you may of noticed i am new to java. this is the code i have used for my text box
    topmostSubform.Page1.titleother::calculate - (JavaScript, client)
    if (titlebox.rawValue == 5)
    this.presence = "visible";
    else
    this.presence = "invisible";
    this.rawValue;
    i have tried variations of this script but it still doesnt work the way it should. i tried searching forums and help files but couild not find an answer to this simple problem... can anyone help

    thnaks for your post thomas i appreciate your help on this :)
    yes it did put 'other' in my text box.
    i managed to overcome the proble using a workaround, it isnt ideal but it works. i put a clickevent in the radiobuttons and changed the text box from calculated to optional

  • Hide/show text boxes in report header

    Hi All,
    I'm trying to implement a request to have a tablix header frozen in excel. So, I'm placing it in the report header as text boxes. However, there are two different tablixes (a one per page) with two different headings. I'm trying to place those two headings
    into two rectangles in the report header hiding and showing a one of it based on the Page No. It works but only for the first tablix heading as it's shown on the first page and hidden on the second page. But, the second tablix heading is not shown on the second
    page for some reason. It's probably due to the Page No rendering is  going later than the text boxes  appearances on the second page or something else causing it. 
    I did try to use the Global Page No in if visibility statement for those two rectangles, trying to get Page No through a function, using it as a parameter,  but nothing is making the second rectangle to show on the second page report header.
    Please, help with how it could be done.
    Thanks

    Hi al-dol,
    Per my understanding that you have put the textbox in the page header to display the table head instead of in the tablix thus you will got the frozen head when export to excel, you have two table header, so you need to add two rectangle to display both in
    two different page, now the issue is the second page header didn't display, right?
    I have testted on my local environment and can reproduce the issue, the issue can be caused by when you move the rectangle2 on the position of the rectangle1 then the rectangle becomes the child of rectangle1 but not the child of page header thus you will
    not shown the rectangle2.
    Please check the details information below to see if you have got the rectangle2 inside the rectangle1 like below:
    if so, please move the rectangle2 one time and check to make sure you got the "Page Header" in the parent section of both rectangle:
    Please also make sure you have use below expression to show/hide the rectangle:
    rectangle1:
    =iif(Globals!PageNumber=1,false,true)
    rectangle2:
    =iif(Globals!PageNumber=2,false,true)
    If you still have any problem, please feel free to ask.
    Regars,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How can I have a button that will show/hide a text box and images on the same page?

    I have a page like below:
    I want to make so that those 3 buttons show different text under them when they are each pressed. How can I achieve this?
    Thanks.

    Hello,
    Please try using Tooltip Composition Widget to achieve that..
    You need to customize  the trigger as the button  and you can use the target to insert desired text box or images.
    you can find this in Widgets library panel > composition
    Please let me know in case you need any other clarification on that.
    Regards
    Vivek

Maybe you are looking for

  • Value not set to model for f:selectItem itemValue=" "/

    I have a selectOneChoice which value is bound to a String property in backing bean. I select among several one-character values, single space is one of them. The original value is null. When I select the single space option, it is not set to the back

  • Problem empty trash

    Hi everyone , I have a problem to empty the trash. when I clic on "empty trash" it look like it empty the trash but the trash is still full. I checked the permission of the disk and I get the following log: ACL found but not expected on "System/Libra

  • My Caller ID only shows up as unknown. I need help please.

    Ever since I got my iPhone 3G in august my caller id for anyone outside my area shows up as unknown no phone number at all just unknown and its very very frustrating. I moved to college station texas from iowa and I changed my phone number to an texa

  • Development query?

    Hi Friends What is the diff bet badi development(badi already existing), custom development and bapi development(bapi already existing).If both badi and bapi exist. Which is preferred for modifications. Regards Ian

  • Ipod touch is disabled and does not show in itunes

    My sons ipod touch says ipod is disabled connect to itunes.  When I connect to itunes it says it has a password and can not access the ipod.  I am completely ok with restoring it but I seem to have no options.  I updated itunes to newest version, did