Hide Text Field at run time

Hi,
I am trying to hide a text field  when it is empty in Adobe form .
The code for this
if( hasValue($record.LOCAT) )
LOCAT.presence eq 'visible'
else LOCAT.presence eq 'hidden'
endif.
I have written this code in the initialise event for the text field.
As far as I know this is possible for interactive forms. Is there a possible way to implement it in for static adobe form.
I am very new to both Adobe form and java scrpit.
Please help me .
Rashi

Hi,
I tried both ur suggestions but no luck.
I also went through the document and implemented the following changes to my form
Created a script object  with a function in it trying to make the text field hidden in all cases
function emptyCheck(oField){
if ((oField.rawValue == null) || (oField.rawValue == "")) {
oFieild.presence = "hidden";
else{
oFieild.presence = "hidden";
and then applied to my text field  in the initialize event
script_obj.emptyCheck(this);
While testing (print preview) it is not showing any error but when I am running my form it still shows the text field.
My requirement is this that if the field is empty it should be hidden and I would like to be able to move the lines below it upward on the form to fill in the space left by the data field so that no empty space is displayed.
Am I doiing anything wrong ?
Please suggest.
Rashi

Similar Messages

  • Possible to change type of spry validation text field at run time?

    I am trying to record a date of death on a form, which obviously for live people might not require a value. I have a radio group (Yes/No) that specifies whether the fields associated with the date of death are visible (select for month, day and year).  For the year, I have it set to be an integer with a minimum and maximum value.  The selects have an invalid value of -1 set, with one item labeled "Select month" and "Select day" given the -1 value.
    When the "no" button is clicked, I want to make it so that submitting the form does not cause validation errors for the spry fields associated with the date of death.  I have successfully added onChange events to the select objects that call javascript, along the lines of spryselect1.invalidValue = -2.  I can also make it so that the text field representing the year of death is not forced to be required: sprytextfield1.isRequired = false.
    However, I'm having a hard time getting the "invalid format" validation to be canceled.  I have tried executing sprytextfield1.type = "none", since looking at the source code in SpryValidationTextField.js seems to indicate that the object's type property is important.  However, this doesn't work; I think that's because the type property is used to look up a validation function in an array when the object is constructed, and may not be referenced again after that.
    So, I'm looking for either:
    a property/method to call to effectively change the type OR
    information on whether reconstructing the variable with new options will work.  I am not sure if any event handlers registered during the object's original construction will still be fired even if I make the variable point to a new object.  I see a destroy function in the source code that might do what I want, but my Javascript knowledge isn't too great, so I don't know if that method needs to be called explicity or whether it happens implicitly when an object is garbage collected.
    Thanks in advance for any help you might be able to give.
    Ryan

    This may help
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Deleting and rebuilding validations</title>
    <link href="http://config.spry-it.com/css?f=ValidationTextField" rel="stylesheet" type="text/css" />
    <script src="http://config.spry-it.com/js?f=ValidationTextField" type="text/javascript"></script>
    <script type="text/javascript">
    // build validations and delete / destroy them
    function val(e){
         // get the value
         value = e.value;
         // see what radion button we have
         if(value == "Married"){
              // if there inst a validaton build one
              if(!sprytextfield1){
                   sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
              // if there is a validaiton in sprytextfield destory it, and clear the variable
              if(sprytextfield2 && sprytextfield2.destroy){
                   sprytextfield2.resetClasses();
                   sprytextfield2.destroy();
                   sprytextfield2 = null;
              // same as the rest
              if(sprytextfield3 && sprytextfield3.destroy){
                   sprytextfield3.resetClasses();
                   sprytextfield3.destroy();
                   sprytextfield3 = null;
         } else if(value == 'Defacto'){
              if(!sprytextfield2){
                   sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
              if(sprytextfield1 && sprytextfield1.destroy){
                   sprytextfield1.resetClasses();
                   sprytextfield1.destroy();
                   sprytextfield1 = null;
              if(sprytextfield3 && sprytextfield3.destroy){
                   sprytextfield3.resetClasses();
                   sprytextfield3.destroy();
                   sprytextfield3 = null;
         } else if(value == 'Single'){
              if(!sprytextfield3){
                   sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
              if(sprytextfield1 && sprytextfield1.destroy){
                   sprytextfield1.resetClasses();
                   sprytextfield1.destroy();
                   sprytextfield1 = null;
              if(sprytextfield2 && sprytextfield2.destroy){
                   sprytextfield2.resetClasses();
                   sprytextfield2.destroy();
                   sprytextfield2 = null;
         // proceed with the rest as normal
         return true;
    </script>
    </head>
    <body>
    <form id="form1" method="post" action="#">
         <p>
              <input type="radio" name="radio" id="Married" value="Married" onclick="val(this);" />
              <label for="Married">Married</label>
         </p>
         <p>
              <input type="radio" name="radio" id="Defacto" value="Defacto" onclick="val(this);" />
              <label for="Defacto">Defacto</label>
         </p>
         <p>
              <input type="radio" name="radio" id="Single" value="Single" onclick="val(this);" />
              <label for="radio">Single</label>
         </p>
         <hr />
         <span id="sprytextfield1">
         <input name="married" id="f_married" type="text" value="forMariedOnly" />
         <span class="textfieldRequiredMsg">A value is required.</span></span><span id="sprytextfield2">
         <input name="defacto" id="f_defacto" type="text" value="forDefactoOnly" />
         <span class="textfieldRequiredMsg">A value is required.</span></span><span id="sprytextfield3">
         <input name="single" id="f_single" type="text" value="forSingleOnly" />
         <span class="textfieldRequiredMsg">A value is required.</span></span>
         <hr />
         <input type="submit" value="Submit" />
    </form>
    <script type="text/javascript">
    <!--
    // as Married is checked by default, we need to validate this field only
    var sprytextfield1,
         sprytextfield2,     // empty global var
         sprytextfield3; // empty global var
    //-->
    </script>
    </body>
    </html>
    Gramps

  • 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

  • How to Hide the Parameter field at run time....

    Hi,
    I have a parameter field which behaves differently depending on the User logged in.
    It has the LOV coming from following SQL.
    SELECT customer_name FROM Cust_mast;
    If the user = 'INTERNAL' then the Where clause will be
    WHERE cust_id in('DELL', 'SBC', 'BANK')
    Else there will be no WHERE clause or the parameter field
    should be hidden in the parameter form.
    So my questions are:
    1) How to hide the Parameter field during Run time?
    OR OR OR
    2) How to change the LOV select statement during Run time?
    Thanks.
    Ram.

    Hi Ram,
    Is there any way to play with the sql query SELECT using DECODE ?I'm not sure of this part, maybe someone else can suggest a way.
    However, what you want can be done in 2 other ways:
    1. Build 2 reports. Both reports will just be duplicates of each other, only difference being that the 'LoV where clause' will be different. Now you can fire the appropriate report in many ways. For example, if the customer is alreay logged inside your custom application, and therefore you already know whether the user is internal of external, you can design your button or link which launches the report to contain logic such that one of the 2 reports is fired depending on who the user is.
    1. Use a JSP parameter form, not a paper parameter form In this case, just build an HTML parameter form in the web source of your report. Use Java logic to populate the LoV drop-down list. When you have to launch the final report, just launch the paper-layout of the report. For example (you will have to modify this):
    <form action="http://machine:port/reports/rwservlet?report=ParamForm.jsp+..." name="First" method="post">
    <select name="selected_customer" onChange="First.submit()" >
    <option value="">Choose a Customer Name
    <rw:foreach id="G_cust_id" src="G_cust_id">
         <rw:getValue id="myCustId" src="CUSTOMER_ID"/>
    <rw:getValue id="myCustName" src="CUSTOMER_NAME"/>
    <option value="<%=myCustId%>"><%=myCustName%>
    </rw:foreach>
    </select>
    </form>
    In the code above, you will have to make sure that your report's data model defines 2 CUSTOMER_ID's (like CUSTOMER_ID_INT and CUSTOMER_ID_EXT). These 2 will be internal and external Cust ID's. Use Java logic to show one of them.
    Navneet.

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • How to generate database text items at run time in oracle forms 6i?

    i have a text item with NUMBER OF ITEMS DISPLAYED=3. My requirement is, i need to generate text items at run time under each TEXT ITEM(3 text items will be there since number of items displayed is 3) and the values will be stored in the database based on the primary key combination. pls help me to solve this pblm

    Hi,
    You cannot generate items dynamically at runtime. The only thing you can do is show and hide item on time. Thay seems that they are generated at run time. Second thing you can do is that you can put items on stack canvas and set visible property of stack canvas to no and at run time set it to visible according to ur condition. Otherwise there is no way. If you find any other way, plz do inform here also.

  • Hide radio button in run time

    Hi expert,
    kindly help me for hide radio button in run time for web dynpro kindly give me on example .
    thank's and regard's
    Vikash

    hi.
    For Visibility :
    ->  bind its Visible Property to the context of type WDUI_VISIBILITY.
    -> Now make it visible or invisible according to your requirement.
    using Code Wizard ( Control + F7) , Set the particular context.
    For visible Set as 02.
    For invisible Set as 01.
    code for your ref ( Generated using Code Wizard- Set the particular context attribute. )
    In below code : radiobutton is binded with CA_VIS of type WDUI_VISIBILITY
    DATA lo_el_context TYPE REF TO if_wd_context_element.
    DATA ls_context TYPE wd_this->element_context.
    DATA lv_ca_vis TYPE wd_this->element_context-ca_vis.
    get element via lead selection
    lo_el_context = wd_context->get_element( ).
    @TODO handle not set lead selection
    IF lo_el_context IS INITIAL.
    ENDIF.
    @TODO fill attribute
    lv_ca_vis = 1.
    set single attribute
    lo_el_context->set_attribute(
    name = `CA_VIS`
    value = 02 ).
    I hope it helps.
    Check the sample Wedbynpro Component WDR_TEST_events . This is having the complete UI element functionalities in WDA.
    Thanx.
    Edited by: Saurav Mago on May 1, 2009 1:53 PM

  • How to change dynamically text label at run time in the forms

    Hi,
    I am having a form in which i want to change the text label dynamically. I mean when a certain condition match then text label should be change and when condition does not match then the text label should reamin as it is in the same form.
    plz help
    thanks in advance
    azhar

    Hi,
    Use this code to change the label at run time.
    set_item_property('deptno',prompt_text,'pagal dept');
    Prompt_text is used for changing label at run time.

  • How to auto-generate a "empno" field at run time in oracle forms 6i

    Hello!
    I have connected to a SCOTT schema. And i am using emp table. At run time mode when i press F8 then the data is displayed in the fields.
    My task is to generate auto "empno" as soon as i run the form. Kindly do the needful.
    Thanks in advance

    Hi Francios,
    I think with your solution our user only able to see the current information in the form.I donot think it will auto generate the empno.
    Dear user,
    I suggest what you can do is to create one sequence in your database and use it to generate automatic
    empno.
    In post query trigger try to implement the idea.
    Suppose in the name of the sequence is empno_seq.
    if emp.empno is null then
    :emp.empno := empno_seq+1;
    end if;
    Try i hope it will work
    Regards
    Rajat

  • I'm having trouble with a Text Field and a Time Format

    I have created a form.
    There are many text fields for clients to fill out.
    One Field have been formatted to enter a time. Ex. 6:00pm.
    This works great unless it's a 12:00am time then the field reads 00:00am
    I would rather it read 12:00 am.
    How can I do this?

    Maybe you should put the time format in 24hour instead.

  • Text translation in run time.

    Hello Guys,
                    I have an requirement its like:
    when we send data from SAP to other system using outbound idoc for material.
    I need to translate the material text at run time and populate in to some other 2  segments and send.
    I will be knowing in which two languages to translate only at run time.
    Please help me how to translate the text in run time.....is there any function module or.............
    Will be rewarded with full points.
    Thanks
    Mohammed Baleeq Ahmed.

    based on the message type check the user exit in the below link
    http://www.ittestpapers.com/attachments/download/8/idocswithu_exits_ITtestpapers.com.pdf
    Thanks
    Bala Duvvuri

  • Can't hide text field label..only text field

    I'm trying to display text field boxes on a form to fill out when a box is checked.  I'm able to do this for the actual text field, but can't figure out how to hide then show the associated text field label.  Can you tell me what I'm doing wrong?
    Thanks!
    var nHide =
    event.target.isBoxChecked (0) ? display.visible:display,hidden;
    this.getField ("Name").display = nHide; this.getField

    First of all, you're using Acrobat JavaScript in an XFA form, which doesn't work.
    LiveCycle Designer has its own interpretation of JavaScript, which is different to Acrobat.
    There is also a second scripting language called FormCalc available.
    Its syntax is much easier to learn and is matches perfectly to manipulate XFA forms.
    Check the help (F1 button) in Designer to get the Designers scripting guide.

  • Set value Field in run time

    hello guys!!!
    it's called the process where
    on my screen I have two fields
    Field 1: enabled for editing
    Field 2: disabled for editing
    when i fill the value in a field 1 I want to play the same value for the field 2 in run time. that´s possible?What can I study?

    So, you want the user to be allowed to enter a value in field 1, then after tabbing out to the next field, display that same value in a non-editable field underneath?
    You can definitely implement this using Partial Page Rendering (PPR).
    Go to your help section within JDeveloper. Type in "Partial Page Rendering Exercise". A tutorial will pop up showing you how to implement this sort of thing.

  • Problems in text field when running java

    Hi,
    I updated yesterday to Firefox 10.0 and then I updated also Java Platform. I'm now having this problem: I use Java in one webpage and have other tabs opened. When I switch between tabs the menu bar becomes grey and I'm not able to type in the text fields of any tabs (address bar, search bar or text fields in webpages).
    The menu bar anyway it's still active (I can click and choose what to do). When I make some operation (ie: Tools - Download but also any other) the menu turns back in bold and I can type again.
    I'm using Windows xp professional, Service Pack 2.
    Let me know if you need more info.
    Thanks in advance for your help.
    C.

    Yep! I also have this problem! You are not alone. Interacting with Java and then clicking the address bar seems to disable it so that you can't highlight or type in the address bar! This is really annoying me and I hope it gets a fix fast.
    Thanks for sharing. ^.^

  • How to hide text field item based on true or false cases in oracle apex

    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.

    Hi 2932464,
    2932464 wrote:
    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.
    Giving you example how to achieve this.
    Step 1. Create three Page Items
        1) P1_ORDER_NO - Text Field
        2) P1_REVISION_NO - Text Field
        3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No
    2. Create 3 Dynamic Actions
    1) Disable revision number on page load
        Event - Page Load
        Action - Disable
        Fire When Event Result Is  - True
        Selection Type - Item
        Item - P1_REVISION_NO
      2) Check duplicate order number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ORDER_NO
        Condition - is not null
        Action - Execute PL/SQL Code
        Generate opposite false action - Unchecked
        Fire When Event Result Is  - True
        Fire on page load - Unchecked
        Stop Execution On Error - Checked
        Wait for Result - Checked
        PL/SQL Code -
    declare
    l_count number;
    begin
      select count(*) into l_count
        from emp
       where empno = :P1_ORDER_NO;
    if l_count > 0 then
      :P1_ENABLE_DISABLE_REVNO := 1;
    else
      :P1_ENABLE_DISABLE_REVNO := 0;
    end if;
    end;
    Page Items to Submit = P1_ORDER_NO
    Page Items to Return  = P1_ENABLE_DISABLE_REVNO
    3 ) Enable and Disable Revision Number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ENABLE_DISABLE_REVNO
       condition - greater than or equal to
       value  - 1
       Action - Disable
       Fire on Page Laod - Unchecked
       Generate opposite false action - checked
       Selection Type = Item(s)
       Item(s) - P1_REVISION_NO
    Hope this helps you,
    Regards,
    Jitendra
    DER_NO

Maybe you are looking for

  • Is it possible to upgrade a dv5 1010us processor?

    I want to upgrade my HP dv5 1010 laptop processor. Presently my laptop has a 2.00 GHz Intel Core 2 Duo Processor P7350. I was wondering if it was possible to remove the old processor or is it soldered on the mainboard? If it is removable can I upgrad

  • Invisible Text  item cursor in forms 4.5... How to resolve?

    In certain Text items in forms 4.5, the txt cursor is not displayed. The propertys are the same that other text items, the display propertys are: -Font : MS SanSerif -Size : 8 -type : plain -weight : DemiLight Foreground : Black Background : White Wh

  • Form Variables Don't Pass for Some Clients

    Recently, I've noticed some problems on one of my pages where form field variables aren't passing to my action page. As far as I can tell, this is a new problem. This is the error I'm getting: Error resolving parameter FORM.EMAIL The specified form f

  • Mounting Group Folders

    Wondering if Snow Leopard machines have issues mounting (connecting) group folders to Lion Server? Has anyone had any issues. I just finished setting up a new Lion Server and currently my Snow Leopard Machines are having issues mounting the group fol

  • October CPU Patch Caused Font Display Issues

    We loaded the forms server October CPU patchset in test and our web deployed 10g forms are now displaying a smaller font. We've tried recompiling the forms on the server to no avail. It appears that the font is shrunken about 2 points so we would hav