How to make a button show AND hide a field?

In an interactive form (with Adobe Acrobat X Pro), how can I purpose one button to:
1.) Show a field when clicked the first time
2.) Hide a field when clicked a second time
I seem to only be able to make a button do one or the other, but not both with the same button. Maybe an easier way to say this is I want to be able to have one button turn a field "on" and "off".
Any help would be GREATLY appreciated. Thanks! 

Use this code:
var f = this.getField("OtherFieldName");
if (f.display==display.visible) f.display = display.hidden;
else f.display=display.visible;

Similar Messages

  • How to get the total amount and hide the field

    Hi Experts,
    In Crystal report parameter screen, user has the option to Mutliselect either Donor or Grant or Donor & Grant; based on that in report output user is expected to see list of Donors with Grand Total. Requirement is not to split Amount by Donor rather need to show list of all Donor in header and Grant Total in Footer.
    For example from the above list if user selected Algeria, Austria, Australia and India each country/Donor contribution  is 150 than expected output will be
    Algeria
    Austria
    Australia
    India
    America
    Grand Total = 600
    please let me know if any one get idea about this requirement.
    Best Regard,
    sowjanya.k

    Hi Sowjanya,
    If you're simply trying to place a grand total, use the 'Insert Summary' option.
    Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
    -Abhilash

  • Error in my show and hide button prg

    Hello Frnds,
    With this link tutorial iam doing now but error raised , and tried my best plz check the tutorial and solve my prb
    Method ONACTIONSHOW_HIDE
    *THIS IS CODE FOR SHOW AND HIDE THE INPUT FIED BUT GETTING ERROR IS
    **set_attribute_property doesnot exit similar ly get_attribute_property and set attribute is there like that getting error for this code
    . DATA lo_nd_radio_node1 TYPE REF TO if_wd_context_node.
    DATA lo_el_radio_node1 TYPE REF TO if_wd_context_element.
    DATA lw_index TYPE I.
    DATA lo_el_radio_node1_1 TYPE ref to if_wd_context_element.
    navigate from <CONTEXT> to <RADIO_NODE1> via lead selection
    lo_nd_radio_node1 = wd_context->get_child_node( name = wd_this->wdctx_radio_node1 ).* call method get lead selection index to get index
    CALL METHOD lo_nd_radio_node1->get_lead_selection_index
    receiving
    index = lw_index. lo_el_radio_node1_1 = wd_context->get_element( ). If lw_index = 1. * call method set attribute property and pass value as 'X' to show
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'FIRST_NAME_1'
    property = 1
    value = 'X'.
    call method set attribute property and pass value as 'X' to show
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'LAST_NAME_1'
    property = 1
    value = 'X'. Else. call method set attribute property and pass value as SPACE to HIDE*
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'FIRST_NAME_1'
    property = 1
    value = space.* call method set attribute property and pass value as SPACE to HIDE
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'LAST_NAME_1'
    property = 1
    value = space. Endif

    Hi Ananth,
    I tried the same code from that tutorial,its working fine.
    once again check the name of the nodes and the elements.
    you can try another way also to show and hide input fields.
    create one attibute of type WDY_BOOLEAN and bind this attribute to the visible property of the input fields.
    for example
    attibute name = 'visible ' : type = wdy_boolean :default value = X
    onaction of the radio button place the following code.it really works
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_visible TYPE wd_this->element_context-visible.
      DATA lo_nd_radio_node1   TYPE REF TO if_wd_context_node.
      DATA lo_el_radio_node1   TYPE REF TO if_wd_context_element.
      DATA lw_index            TYPE i.
      DATA lo_el_radio_node1_1 TYPE REF TO if_wd_context_element.
      lo_nd_radio_node1 = wd_context->get_child_node( name = wd_this->wdctx_radio_node1 ).
      lo_el_context = wd_context->get_element( ).
      CALL METHOD lo_nd_radio_node1->get_lead_selection_index
        RECEIVING
          index = lw_index.
      lo_el_radio_node1_1 = wd_context->get_element(  ).
      IF lw_index = 1.
        lo_el_context->set_attribute(
      name =  `VISIBLE`
      value = 'X' ).
      ELSE.
        lo_el_context->set_attribute(
      name =  `VISIBLE`
      value = ' ' ).
      ENDIF.
    Thanks,
    krishna

  • Iframes show and hide

    Hi All,
    I have the Requirement like :
    I have two iframes side by side in a page, and two buttons show and hide,
    once i click hide button second iframe should disappear and first one should be increase in size to fit whole window. and once i click show first and second should be 50/50 in the page
    for this i followed below steps
    1) created page.
    2) created two report region (No Template)
    3) In one region source i called iframe like
    TABLE>
    <TR>
    <td>
    <IFRAME SRC="http://Localhost:7777/pls/apex/f?p=&APP_ID.:&P104_INTERFACE.:&SESSION." WIDTH=&P104_WIDTH. HEIGHT=540 scrolling="auto" frameborder="1"></IFRAME>
    </td>
    </tr>
    </table>
    4) in second region
    TABLE>
    <TR>
    <td>
    <IFRAME SRC="www.google.com ; HEIGHT=540 scrolling="auto" frameborder="1"></IFRAME>
    </td>
    </tr>
    </table>
    6)conditionally showing the region with the help of SHOW and HIDE BUTTON
    7)and also on Show and hide button i am setting the value of P104_WIDTH . So the size will vary with conditional display?
    NOW MY QUESTION IS:
    once i click hide button THE CONTENTS(item VALUES) OF THE FIRST FRAME ARE REFRESHED, DUE THAT ALL ENTERED DATA WIL DISAPPEAR SO HOW TO AVOID IT , without refreshing the frist frame i need to set the P104_width value so it interm width will set in the iframe region??????
    Thanks & Regards
    Nagaraj B K

    I had another idea that I am pursuing. I am looking into extending the current renderer CommandNavigationRenderer and will render another goLink just after the current goLink that will execute a close action. I was able to re-direct the rendering by added an override render-kit block in my current faces-config.xml file.
    <render-kit>
    <renderer>
    <component-family>org.apache.myfaces.trinidad.Command</component-family>
    <renderer-type>oracle.adf.rich.NavigationItem</renderer-type>
    <renderer-class>com.riscs.ui.backing.jsp.components.ClosableCommandNavigationItemRenderer</renderer-class>
    </renderer>
    </render-kit>
    If this works I am planning on extending the commandNavigationItem by creating a ClosableCommandNavigation tag and add a "closeAction" tag that will determine if a close item should render.
    Preliminary work looks promising. I will update if I make progress...please let me know if I am crazy.
    Thanks.

  • How to make a button to stop and run a for loop?

    How to make a button to stop and run a for loop?  and if it is stopped it shall start from where i t stopped.

    Your VI has some very fundamental flaws.
    The start/stop button is outside the FOR loop, thus it will NOT get read during execution of the FOR loop, but only before the FOR loop starts. Think dataflow!
    Thus the terminal of the start/stop button belongs inside the FOR loop.
    Your FOR loop iterates 20x, which probably takes about a nanosecond. You will NOT be fast enough to reliably press the start/stop button during a specific iteration of the FOR loop.
    Your code does not "stop and run" a FOR loop (sic). The loop always spins, but executes an empty case when "Stopped". I guess that's what you actually want?
    Once you solve (2), the x indicator will contain a random value whenever you "stop".
    As soon as the 20 iterations complete, the outer while loop spin an things start over, another nanosecond later.
    Place e.g. a 500ms wait inside the FOR loop to solve this.
    Don't place terminals of indicators on top of formula nodes.
    Your formula does not produce any output, so really has no purpose.
    Use a real "stop" button to terminate the while loop (mechanical action: latch when released). Right now you are using a plain switch, which does not reset to false before the next run. This means that you need to manually reset it before running the program again.
    It is oftern useful to operate the VI in execution highlighting mode. You will immediately see that your button does not get read during execution of the FOR loop. Try it!
    LabVIEW Champion . Do more with less code and in less time .

  • Show and hide Lov icons and Date Picker image on conditional?

    How to show and hide Lov icons and Date Picker image on conditional?

    Why do you just want to make the icons conditional? Shouldn't the field also be conditional?
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • How to make a button to search something in sql

    I am trying to make a button that can search for something like for example if like say i type yes, it will show me things that is under yes.But I am not sure how to make the code work as I cannot change the php code as it is under the requirement that I make the button work and not using the php code to make it work which means that I cannot type the yes to show the information and the button must somehow have the "yes" in the function to show the information.Please help me and Thanks for your help.
    This is my flash code.
    package  {
      import flash.display.MovieClip;
      import flash.net.NetConnection;
      import flash.net.Responder;
      import flash.events.MouseEvent;
      public class main extends MovieClip {
      var gateway:NetConnection;
      var responder:Responder;
      public function main() {
      gateway = new NetConnection();
      gateway.connect("http://localhost:8088/amfphp/gateway.php");
      responder = new Responder(OnPass,OnError);
      showAlBtn.addEventListener(MouseEvent.CLICK,doAvailable);
      function doAvailable(evt:MouseEvent):void
      gateway.call("Books.getBooksAvailable",responder);
      function OnPass(res:Object):void
       var i:int;
      albumDG.removeAll();
      for (i=0;i<res.length;i++)
      albumDG.addItem(res[i]);
      function OnError(res:Object):void
      trace("Error");
    .This is the code for the php code that works because I already tested it out because it allows me to type yes and it shows me the required information that I need and it is not tested on flash cs6 but on local host things that allows me to test it out.
    function getBooksAvailable($avail)
      $this->connect();
      $sql = "SELECT title as 'Book Title', author as 'Author', price as 'Price', available as 'Available'
      FROM tblbookinventory
      WHERE available ='" . $avail . "'";
      $result = mysql_query($sql, $this->_connection);
      $rows = array();
      while($row = mysql_fetch_array($result, MYSQL_ASSOC))
      array_push($rows, $row);
      return $rows;

    use the urlloader class to call your php file. 
    the php function you showed is expecting a variable ($avail)  that might accept a value of 'yes'.

  • How to make the buttons INVISIBLE in the Application toolbar

    Hi All,
    I have a requirement to create a button in the Application toolbar of the Module Pool Screen. The field should be made Invisible by default. and it should be displayed based on one condition.
    Could you please let me know how to make that particular button INVISIBLE. I think we can make it invisible by using EXCLUDING statement. But, How to make the button VISIBLE again when the check is satisfied.
    I found from the portal that the FM 'VIEW_SET_PF_STATUS' can be used to make a button INVISIBLE. Could anyone help me out how to pass the parameters to this Function module?
    or is there any Function Module available to make the button VISIBLE and INVISIBLE? Please help me on this issues.
    Is there any possibility to make the button VISIBLE or INVISIBLE as we do for the screen fields using LOOP AT SCREEN..?
    Thank you in advance.
    Regards.
    Paddu.

    Hi,
    Try to use below in the PBO module status_0100 OUTPUT.
    DATA t_fcode TYPE TABLE OF sy-ucomm.
    refresh t_fcode[].
    APPEND 'Function code name of the button' TO t_fcode. 
    Check the condition here for which you want to make field visible.
        DELETE FCODE of the button from T_FCODE table
      ENDIF.
      SET PF-STATUS 'STATUS_0100' EXCLUDING t_fcode.

  • How to make new item show in ASCP Plan workbench.

    Item ATT.BVL3AHY is a new item without any demand. At item master, it is set as Planned so it is collected by ASCP. The item can be found in msc.msc_system_items with Plan_id -1. Plan id -1 corresponds to Collection. Planner needs to manuallty add planned order for this item at ASCP workbench of plan WIRELINE (PLAN_ID 3002) as attached but as the item cannot be found in WIRELINE plan, planner cannot add it. Please let me know how to make this item show in WIRELINE Plan workbench.

    Run this query:
    select mrp_planning_code from msc_system_items where item_name like '<Item_Name>' and organization_id = <Org id> and plan_id = -1
    If this returns 7 you dont need to run any collections.
    If this returns other than 7 then,
    create a simulation set under Item Attributes Mass Maintenance and then update the attribute MRP Planning method for this item to MRP/MPP Planning. Assign Simulation set to plan name and then rerun the plan. It should work.
    If you are still facing an issue, then raise an SR with Oracle.

  • How to make "Utility" button in Printer Setup Utility available

    There, i add a printer in the Printer Setup Utility and select it. i want to open printer utility, but the "Utility"
    button in Printer Setup Utility is dimmed. In addition,
    "Printer\Configure printer" in the Printer Setup Utility menu is also dimmed.
    How to make "Utility" button in Printer Setup Utility available?
    Thanks in advance.

    Hi Jiong,
    That button is to acess the printer utility for that particular printer, not all printers come with a utility. If you have the disk that came with your printer, you can see if it has a Macintosh driver, if it does then it mimght have the utility with it. It's pretty hard to run the utility on its own, its burried somewhere in the system so that's why you have that menu item. You can alternatively go on the internet and download the latest driver, which might have a utility. All the utility will do will give you options to check nozzle patterns, alighnement, ink tank levels, and cleaning options - just mimnor maintenence junk, non-essentials, etc. I think Tiger just comes with a whole heap of generic drivers for different printer lines, can't say for sure.
    I wouldn't worry about it, especially if you have a relatively old printer.
    Hope that helps
    DKR

  • How to make plug ins show up in the filter menu, several Topaz plug ins are in the 13 plug in folder?

    How to make plug ins show up in the filter drop down menu, when several Topaz plug ins have been moved from Elements 11 to the plug in folder for Elements 13?

    Thank you for your advice. I followed your directions, but came up with the same results. However, I did discover that whenever I open up the iPhoto Library that is already existing on my MacBook a certain set of pictures shows up. But then when I open up the iPhoto Library from the Hard drive another set of pictures shows up. BUT not ALL of my pictures are showing up on the iPhoto Library from the hard drive. At least the last two years of pictures are not showing up?! Actually, it appears that all the pictures are there from when I started using iPhoto about 5 years ago up until around the time that I got my iMac desktop computer and started using that (2 years ago). I have noticed that more recent videos I have made are showing up in a folder on the hard drive, but will not appear when I open up iMovie?! Any ideas on how to access my pictures from the last 2 years off of the hard drive???

  • How to make a button load a sprite from library??

    PLEASE HELP!!
    Hey everyone.. iv been looking for help for a few weeks but cant seem to find the awnsers
    I am trying to create a newspaper that consists of four pages. Each   page i have created and are sitting in the library as sprites. Each page   has buttons that need linking so that when pressed it loads the next   page or page that i want. This is the part i am confused with =/ how do i   make the buttons on each page load the next page (sprite) from the   library??
    Basically i want to no how to make a button load a sprite from the library when clicked. Does anyone no the script for this?
    Thanks for any help

    A question arises as to whether or not you are posting in the right forum.  Sprites are AS3 objects.
    If you want to add movieclips to the stage from the library using AS2, then you need to assign them each an Identifier via right clicking them in the library and selecting the Linkage option... from there you slect the option to Export for Actionscript and then assign the Identifier.
    You then use the attachMovie() method to make use of that Identifier to dynamically load the library object.

  • HOW TO MAKE ROUND BUTTON

    HI PLS TELL ME HOW TO MAKE ROUND BUTTON ON FORM.

    Rounded end buttons (e.g. Oracle Look and feel) are do-able in both 6i and 9i using PJCs in the 9i demos see the rollover button example, in 6i I seem to remember that there is a RoundedButton sample in the demos.
    Both sets of demos can be downloaded from http://otn.oracle.com/products/forms.
    If you want circular buttons then you'd have to use an Image for that.

  • SetVisible against show and hide

    Hello, making some practises I have observed that setVisible method doesn't just makes visible or not, it affects me when I change location of components I have played with setVisible, but when I use deprecated methods hide and show I haven't that problem.
    What else makes setVisible than make visible or not?

    Hello, the way I see it, setVisible is just a nicer way of setting visibility than show() and hide(). Anyway, the way setVisible is implemented in the Component class is :
    public void setVisible(boolean b) {
          show(b);
    }So I don't believe you should be experiencing any difference between show() and setVisible(). As to the change in positions of components, you might find the actual implementation useful:
        public void show(boolean b) {
            if (b) {
                show();
            } else {
                hide();
        public void show() {
            if (!visible) {
                synchronized (getTreeLock()) {
                    visible = true;
                    ComponentPeer peer = this.peer;
                    if (peer != null) {
                        peer.show();
                        createHierarchyEvents(HierarchyEvent.HIERARCHY_CHANGED,
                                              this, parent,
                                              HierarchyEvent.SHOWING_CHANGED,
                                              Toolkit.enabledOnToolkit(AWTEvent.HIERARCHY_EVENT_MASK));
                        if (peer instanceof LightweightPeer) {
                            repaint();
                        updateCursorImmediately();
                    if (componentListener != null ||
                        (eventMask & AWTEvent.COMPONENT_EVENT_MASK) != 0 ||
                        Toolkit.enabledOnToolkit(AWTEvent.COMPONENT_EVENT_MASK)) {
                        ComponentEvent e = new ComponentEvent(this,
                                                              ComponentEvent.COMPONENT_SHOWN);
                        Toolkit.getEventQueue().postEvent(e);
                Container parent = this.parent;
                if (parent != null) {
                    parent.invalidate();
        }I left out the hide() code, since it is quite similar. Anyway, if you are interested in this code you can always look it up - it's avaliable.
    Hope this helped, laginimaineb.

  • How to make a Button to work Actively even if there is a mandatory field..?

    Hi All..
    How to make a Button to work Actively even if there is a mandatory field to be fulfilled..???
    I am badly in need of this logic, as i have to incorporate in my code..
    Points will be rewarded without fail..

    Hi Pavan,
    I also faced the same requirement. U can do one thing like remove the obligatory keyword of that parameter/select-option. U can handle the same using the program in at selection-screen event. See this sample of code,
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:  s_land1 for T005-LAND1 <b>[Needs to be mandatory]</b>                 no intervals no-extension.
    SELECT-OPTIONS:  s_panid FOR zoindex_val-zopanid.
    SELECT-OPTIONS:  s_effdat FOR zoexchrate-zedate.
    SELECTION-SCREEN END OF BLOCK b2.
    *-- AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
    *-- Obligatory Country Code
      IF s_land1[] IS INITIAL.
        MESSAGE e050 WITH text-050.
                     "Please select the Country Code
      ENDIF.
    So whenever u do F8/Enter other than that push button, it will prompt u to enter the country code first then only u can proceed.
    Hope this would help u in some way. Please do reward the helpful answers.

Maybe you are looking for

  • I am looking for an app to reduce a photo size to fit into a picture pendant

    i am looking for an app to to shrink photos to print so i can put into a small picture pendant.

  • Creative Audigy 4 Probl

    Hi to all, i tried searching for a similar problem iam currently experiencing but couldn't find any. I have just installed a new Creative Audigy 4 sound card to replace my onboard AC'97 sound card. I have disabled the onboard sound card from the Bios

  • CS5. When I flatten the layers of an images the size went from 100MB to 50MB. Why?

    I use CS5. When I made some adjustment (layers) the size was 100MBs. This was a photo of a painting. When I flattened the image the size went to 50MBs. Why? How canI keep the original size?

  • Can't Connect - HELP!!!!!!

    Hello! I have an iBook (OSX 10.2.8) and every time I try to connect to iTunes I get the following error message: "could not complete the music store request. The store may be busy. Check your internet connection or try again later." Well, I have trie

  • Subcontracting (180)

    hello Guru Insubcontracting Scenario. when send materail for some work but as per std rule he(subcontracter may send material whithin 180days if he is unable to send within 180 days how u going to make scenario if u may scrapp it or make excise in vo