Hide/show the fields based on textbox

I wonder if there is a way to hide certain fields based on the question of if a user enters a value in a text box and then reappear if the value in the text box is removed and the field becomes white.

I have two scenarios where I would this happen

1. I have a "Non-registered" check box and a text field 'blood pressure '. If the user check mark the box "Not registered", the field of blood pressure is hidden (I managed this already). If the user unclicks the box, the field of blood pressure again (even once, I did already). Otherwise, if the user enters a value in the 'pressure' I would 'Unregistered' area to disappear. I got this as well with this code: (placed in the form of javascript Action, mouse upward, event)

this.getField("Not_Recorded").display = event.target.value = "Off"? Display.visible: display.hidden;

I don't know if it's the appropriate script that I use, but he did not hide the field "unregistered". The problem is, I would 'not registered' to hide if a value is entered in the field of blood pressure and reappear if this value is then removed (i.e., the user changes his mind or made a mistake and wants to not click saved instead). I don't know if it's feasible or just way too complicated for me to do.

2. in the second scenario, I have 2 text fields where the user must enter a value for weight in pounds or kilograms. There is a text box for a value of lbs and a text box for a value in kg. If the user enters a value for books, I'd like to field for kgs be hidden, but still, if they delete this value so that the lbs field becomes empty, I would field for kgs reappear.

is this feasible or is there another way I might be able to do this?

For the first, I would not hide the check box for the reason you give. In addition to hide the text field, it must reset it so that any value that the user may have entered is not retained when it is hidden.

If you really want to show/hide the check box depending on whether there is an entry in the text field, you can use the validation script customized for the text field:

var f is getField ("unregistered");.

If (! event.value) {}

f.Display = display.visible;

} else {}

f.Value = "Off";

f.Display = display.hidden;

}

For this script start working, you change the value in the text field.

For the second problem, what I do, is to have a single text field and two boxes to tick to indicate lbs or kg. If you want to stay with the configuration you have, you can clear the other text field with a custom validation script:

Script for weight_lbs custom validate field

If (event.value) getField("weight_kgs").value = "";

Do the same for the other text field, but change the domain name in the script. This will allow only one field to be filled at the same time and do not bother with the masking.

Tags: Acrobat

Similar Questions

  • How to hide/show a field based on the data from more than 1 field?

    Hello.

    I'm trying to hide/show a based on the data of field2 and field3, Field1

    in fact using dynamic measurements I can only hide/show Field1 Field2-based, but I need a combination, for example:

    If field1 = 'A' and field2 = 'B', then see the field3, other hide field3

    y at - it an easy way to do it.

    I use Application Express 4.2.4.00.08

    Thanks in advance

    Dynamic action

    On the changes

    jQuery selector: #P1_ITEM_1, #P1_ITEM_2

    Condition: JavaScript

    $v ('P1_ITEM_1') == 'A' & $v ('P1_ITEM_2') == 'B '.

    Real Action: show item 3

    Action of false: hide item 3

  • Tabular presentation - hide/show the Datepicker calendar

    Hello

    I am toggling of a column of date picker in tabular form wizard based on the value of another column in the same row, using javascript. However, I was unable to find a way to hide/show the associated calendar. Can someone tell me how to proceed?

    Thank you!

    Hello

    The structure on a tabular presentation for a date picker article, is more complicated than for a normal input field:

    <td  headers="Hiredate" class="t4data">
      <fieldset class="datepicker" id="f04_0004_fieldset">
        <table summary="" border="0" cellspacing="0" cellpadding="0" class="datepicker" id="f04_0004_holder">
          <tr>
            <td class="datepicker">
              <input type="text" name="f04" size="7" maxlength="2000" value="01/05/1981"  id="f04_0004" />
            </td>
            <td>
              <a  href="javascript:void($p_DatePicker('f04_0004','0','DD/MM/YYYY','#666666','','','','','1981','en-gb','Y','45958','1683565711731582981','05','210'));">
                <img src="/i/asfdcldr.gif" alt="Calendar" align="absmiddle" />
              </a>
            </td>
          </tr>
        </table>
      </fieldset>
    </td>
    

    While access to the input box by referencing its name attribute, it is impossible to the icon. What you need to do is find the input field, go up to the TR that contains, find indicator A in this TR and hide.

    Try something like:

    <script type="text/javascript">
    function disableDatepickers()
    {
     var f1 = document.getElementsByName("f01");
     var f4 = document.getElementsByName("f04");
     var k;
     var r;
     var a;
     for (k = 0; k < f1.length; k++)
     {
      if (parseInt(f1[k].value) < 7800)
      {
       f4[k].disabled = true;
       r = html_CascadeUpTill(f4[k].id,'TR');
       a = r.getElementsByTagName("A")[0];
       a.style.visibility = 'hidden';
      }
     }
    }
    disableDatepickers();
    </script>
    

    In this example, the first column (f01) contains an EMPNO. If this value is < 7800, I find the datepicker and disable it, then find the A tag that is in the same b and hide. Adjust the f01 and f04 accordance with column names and change the IF test to meet your needs.

    Andy

  • Automatically add delays to the ability to hide/show the bar

    I activated the option to hide/show the bar automatically. I would like it when I touch the upper part of the screen with the mouse, the menu bar will appear with some delays (2 seconds for example). First it is possible to configure the delay?

    NO, but you can offer this feature for Apple

    http://www.Apple.com/feedback/

  • Qosmio G30-126 - how to hide/show the top bar?

    How active hide/show the top bar on the upper side desk, but disappeared how can I return it again?

    You want to have some Flash cards on top of the desktop computer?
    This isn't a problem

    In all programs-> Toshiba-> Utilities-> settings for Flash cards, you can activate this option!

    Check it!

  • Possible to hide / show the slideshow captions?

    Is there a way to hide/show the captions in the slide show? I would like to make something similar to this: http://www.geschewuerfel.com/GalleryMain.asp?GalleryID=117628 & AKey = DSWC4N8C . If you click on one of the images is full screen, then the 'i' button below will reveal the legend.

    Hello

    You can try to use Lightbox composition and then insert balloon in the container box.

    In the ToolTip settings, select stacked position and transition as vertical, it would be a similar effect as you mentioned. Organize the legend, the buttons of navigation in the same area when it should appear as inline.

    Thank you

    Sanjit

  • Is there a way to hide/show the title safe area in Illustrator?

    Is there a way to hide/show the title safe area in Illustrator?

    I know that I can turn on or off by using the options of work plan, but to facilitate the workflow, I wish I could spend it power I can do using the "Cmd:" for guides?

    I know I can show/hide video leaders and I it was mapped as shortcut... but could not find a way to do the same thing with title/action safe?

    Any ideas would be appreciated?

    I am completely new to scripting, so it took a bit of trial and error, but here is one that will turn on and off for all work plans:

    for (i = 0; i

    If (app.activeDocument.artboards [i] .showSafeAreas == true) {}

    app.activeDocument.artboards [i] .showSafeAreas = false

    }

    else {}

    app.activeDocument.artboards [i] .showSafeAreas = true

    }

    }

  • Hide/show the region

    Hello
    I'm trying to change the default behavior to hide/show the region to show, after a few attempts, I got partially work but now does not work by clicking on the icon to enable/disable/hide also changed the icons and added a type = "" but his does not work. " Any help? Thanks and greetings

    You can do so at the level of the model. Copy the skin and see the area to Hide and Show (show) and then modify the model. Essentially 2 thing I've changed are the image of collapse_minus.gif and style ="". My suggestion is to make a copy of the region before making any changes. It works for me in IE, Chrome and FF.







    #TITLE #.
    #CLOSE # PREVIOUS # ##DELETE NEXT ##EDIT ##CHANGE # CREATE # CREATE2 # EXPAND ##COPY # HELP #.
    #BODY #.

  • Hide/show the series (online) and to redraw the map

    I created a box for each lineserie in my linechart and when you click the checkbox I hide/show the on my list.

    myChart.series [5] .visible = myCheckbox5.selected;

    It works fine but I want to redraw the map and this time he doesn't have to calculate the axis according to the values in my series hidden... Someone knows how to do this?

    I tried without success includeInLayout property.

    Found a solution for the exchange of experts, but it was difficult to finish the removal/addition of series from myChart.series and then force a new drawing by resetting myChart.series.

  • Hide - show the button field

    Hello

    I display the image one after the other on the screen.

    According to indext of image I want to hide show next previous button,

    How can I do?

    If (current_index == Questions.size () - 1) {}
    _btnnext.getManager (). Delete (_btnnext);
                        
    } ElseIf (current_index == 0) {}
    _btnprevious.getManager (). Delete (_btnprevious);
    } else {}
    If (! _btnnext.isVisible ()) {}
    _hfm. Add (_btnnext);
    }
    If (! _btnprevious.isVisible ()) {}
    _hfm. Add (_btnprevious);
    }

    }

    Currently, I found this solution.

    But I think there must be another way and then add and remove from view every time.

    Thanks in advance.

    bskania.

    You can do this using the setEditable method

    If (current_index == Questions.size () - 1) {}
    _btnnext.setEditable (false);
                        
    } ElseIf (current_index == 0) {}
    _btnprevious.setEditable (false);
    } else {}

    btnnext.setEditable (true);
    _btnprevious.setEditable (true);

    }

  • Hide/show the ObjectChoiceField...

    Hello

    I have a screen that has hierarchical menus (ObjectChoiceFields).  For example, category, subcategory, and Type.

    Type of choice will fill a selection of the subcategory.  Same subcategory will be filled based on the selection of the category.  In some case there is no subcategories and Types for certain categories and so on for the subcategories.  In this scenario, OS 5 and above to show the space reserved for the empty ObjectChoiceFields.

    Is it possible to hide when I don't need them and show them only when I need it?

    I really apprecaite your answer.  If the solution is little complex so please give me an example on how to do it because I'm still growing in this area.

    Thank you very much in advance,

    Vincent

    It's actually a pretty common question.

    You can dynamically add and remove fields from managers, and when you do, these managers are re-built-out.

    It means finding a way to determine when you should add and/or remove the category and Type.  You can do this with a FieldChangeListener on the category field, will get called whenever the user switches to another choice in the categories available, you can add and delete (and repopulate) fields then, according to the selected index.

    The next problem is where to 'Add' them.  Normally, you just make one

    . Add ();

    but who's going to the field at the bottom of the Manager.  Another option is

    . Insert (, index);

    That you will get through the fields to the right place.

    How do detect you if the area has indeed been added.  General, I do the following

    Manager m = . getManager().

    If (m == null) {}

    has not been added

    } else {}

    has been added

    }

    I hope that you get.  As stated, this question was asked before, typically on the addition or deletion of checkboxFields.  If you want more search for this.

    Good luck.

  • Hide/show a field

    I'm puzzled. I created a box, and I "Mouse Up" to show a hidden field. But when I uncheck the box, the field is still visible. I'm very novice and could use some advise. Thank you!

    Using a checkbox to show/hide fields can be done, but don't not using a mouse event like that it will be a permanent change.  Instead, you can use two buttons, one to hide a specific field and the other to show.  Alternatively, you can use a checkbox and script a bit to work.  C1 is the name of my box and text 2 is the area I want to show or hide. I also gave my box an export value of 2 just arbitrarily.  By placing the script in the field calculate Text2, it will determine if the checbox is verified through tests to see if it has a value of 2, it will have only if verified.  If it isn't then the field is hidden if it is not, then field is visible.  It's a start.

  • Hide/show several subforms based on drop-down list selection

    Hi - I'm wanting to use a selection from a drop-down list for hide/show 17 subforms which contain only text. I tried if/else instructions that I used in the same way before but I have problems of implementation of that time. Is there a better way to do when several subforms are required to show/hide. Thank you.

    What event trigger you the action on? I have the following to the Exit event and it works.

    If (this.rawValue == "Hide") {}

    subForm1.presence = "hidden".

    }

    on the other

    If (this.rawValue == "Post") {}

    subForm1.presence = "visible".

    }

    If however you have the button 'Specify Item values' clicked on the link tab, you need to change the "Hide" values for their specified either value "1".

    You have changed the code to:

    If (this.rawValue == "2") {}

    subForm1.presence = "hidden".

    }

    on the other

    If (this.rawValue == "1") {}

    subForm1.presence = "visible".

    }

  • How to hide/show the column in a table

    Hello world

    I have a table based on the table "Dept".
    Dept_id
    supervisor_name
    Dept_id is the LOV, and it has value (11, 12,...) (20),
    Here, when the Dept_id value is selected as 20, then the field "supervisor_name" must be posted, for the rest of the values, that it must be hidden.
    How this can be done using Jquery?
    Thank you.
    Concerning

    Look at this http://apex.oracle.com/pls/apex/f?p=46417:26

    Test/test connection

    JavaScript Code: Add in the page header > javascript

    function test(pThis) {
     //get the curren row index on change
     var currIndex = $('select[name="'+pThis.name+'"]').index($x(pThis.id));
     if (pThis.value=='20') {
      $('input[name="f01"]')[currIndex].style.display = 'block';
     }
     else {
      $('input[name="f01"]')[currIndex].style.display = 'none';
     }
    }
    

    In the element, add attributes column deptno

    onchange="javascript:test(this);"
    
  • ADF LOV-&gt; UI: main table showing the fields ID and not the search values

    Hello
    I am very new to the development of the ADF and will have a simple question that I can't solve.

    Using Oracle JDeveloper 11.1.2.0.0 I create my views and objects of entity without incident. I have an entity object that has several "search values" (these are all optional references to foreign keys to tables 'children'). Objects and relations are perfectly mapped the ADF.

    In the views of child object I created the list UI tips
    -Type: Combo box with list values
    -the "selected" column is the "description" of the research

    in the editable display object, I traced the fields 'id' to use the predefined LOVs.

    This works as expected in the user interface, I created with an ADF table can be updated.

    However (here's the noob question), the "id" is displayed in the search on the table column. When I click the menu drop-down I can see the description, etc, but for a professional user when they look at the table, they see an unfriendly identification number.

    How can I get the part of the LOV display to show the description, while remaining linked to the ID of the parent entity.

    for example, it shows
    Country             LOV1        LOV2     LOV3
    United States     15           18           2
    while I want to display:
    Country             LOV1            LOV2       LOV3
    United States     Washington  Seattle     Rain
    If this has been answered several times or walk through there, sorry for the redundant question, I simply can't find a solution!

    Hello

    There are several ways to do this, you simply need an additional outputText next to the lov component field to display the value of the description.

    If you search the forum or adf blocks, you'll find several implementations.

    And here's one: http://andrejusb.blogspot.com/2010/06/lov-description-text-with-groovy.html

    Gabriel.

Maybe you are looking for