Fields only "required" when visible

Hi,
I am trying to create a form that has radio buttons "yes" and "no".  I have it set so that a comments box (that is hidden and excluded from layout) becomes visible when the "no" button is clicked and remains hidden or re-hidden (not a real word) when the "yes" button is clicked.
My difficulty is that I would like the comments box to be required only when it is visible.
Can anyone help with the scripting?

Hi Candy,
Thank you so much for your prompt response.  I have tried this. However if the user clicks "no" and then changes their mind and clicks "yes" the Comments box does not disappear.
I have tried this in the Yes:
xfa.form.form1.Inspection.Comments2.presence = "hidden";
var NumOfComments = xfa.form.form1.Inspection.Comments2.count;
//If there is an instance of the subform, remove it. There can only be 1 or 0 instances of the subform
if (NumOfComments == 1) {
xfa.form.form1.Inspection._Comments2.removeInstance(0);
xfa.form.form1.Inspection.Comments2.presence.validate.nullTest = "disabled"
And this in the No:
xfa.form.form1.Inspection.Comments2.presence = "visible";
var NumOfComments = xfa.form.form1.Inspection.Comments2.count;
//if the subform is not there (e.g. user already clicked yes), then add it back to the form
if (NumOfComments == 0) {
  xfa.form.form1.Inspection._Comments2.addInstance(1);
//make the subform visible
xfa. form.form1.Inspection.Comments2.presence = "visible";
xfa. form.form1.Inspection.Comments2.validate.nullTest = "error";
This causes the Comments box to disappear, but it does not fix the validation error.  It is still requiring the comments box at print.  Should I be adding script to validation or preprint?
I am new at this scripting thing and it has taken me so many hours just to get to where I am. My is an inspection checklist with 40 fields. I am so frustrated, any help you could provide would be much appreciated.
TBurg

Similar Messages

  • Payment Card field not required when terms Credit Card is selected

    Hi all,
    I am trying to make Payment Card fields required when the user selects Credit Card as Payment terms. Right now it allows to save the Sales Order even if there is no credit card number entered, even though the Payment Terms has been selected as Credit Card. I found a note 606494 but it has to do with a component we don't even have installed, so I could not implement it. Did not have any luck searching the forums. Please help!
    Thanks,
    Sergiy

    Check the settings -
    Set Up Payment Guarantees
    Define Forms of Payment Guarantee
    Transaction: OVFD
    Tables: T691K
    Action: R/3 is delivered with form “02” defined for payment cards. Other than the descriptor, the only other entry should be “3” in the column labeled “PymtGuaCat”
    Define Payment Guarantee Procedure
    Transaction:
    Tables: T691M/T691O
    Action: Define a procedure and a description.
    Forms of Payment Guarantee and make the following entries Sequential Number “1”
    Payment Guarantee Form “02”
    Routine Number “0” Routine Number can be used to validate payment card presence.
    Define Customer Payment Guarantee Flag
    Transaction:
    Tables: T691P
    Action: Define a flag to be stored in table.
    Create Customer Payment Guarantee = “Payment Card Payment Cards (All Customers can use Payment Cards)”.
    Define Sales Document Payment Guarantee Flag
    Transaction:
    Tables: T691R
    Action: Define the flag that will be associated with sales document types that are relevant for payment cards
    Assign Sales Document Payment Guarantee Flag
    Transaction:
    Tables: TVAK
    Action: Assign the document flag type the sales documents types that are relevant for payment cards.
    Determine Payment Guarantee Procedure
    Transaction: OVFJ
    Tables: T691U
    Action: Combine the Customer flag and the sales document flag to derive the payment guarantee procedure
    Payment Card Configuration
    Define Card Types
    Transaction:
    Tables: TVCIN
    Action: Create the different card types plus the routine that validates the card for length and prefix (etc…)
    Visa , Mastercard, American Express, and Discover
    Create the following entries for each payment card
    AMEX American Express ZCCARD_CHECK_AMEX Month
    DC Discover Card ZCCARD_CHECK_DC Month
    MC Mastercard ZCCARD_CHECK_MC Month
    VISA Visa ZCCARD_CHECK_VISA Month
    Regards
    Sai

  • Is it possible to make a calculated field only appear when the result is greater than 0?

    I am using Adobe Acrobat X Standard.  I have created a form that has caculated fields.  However, the fields always show the "$0.00" when it doesnt have anything to calculate.  I would only like a result to appear in this field when the result is greater than 0.  Is this possible?

    The use of currency and percentage signs always behave this way since the display format is a character string and not a plain number.
    You will have to use some custom JavaScript in the Custom JS calculation, the custom format format, or the validation script.
    There is not a lot of documentation for this, but Acrobat JavaScripting Guide Version 6 has some infromation about usin the AFNumber_Format built-in function.
    If your users are using version 8 or below, you will need to adjust the format of the field.

  • Make PO Box City field as required when either of other fields r non-blank

    Hi,
    I need your help and valuable suggestion to fix this problem.
    While Creating/Changing a vendor, I would like to input some data in the PO box address area (Table LFA1). If I populate the fields PO Box & Postal code fields in this area, the PO box City field should become a required one. Currently it is an optional field. I dont want to do it at field status level.
    If there are not any data in either of those fields, then PO box city field should be an optional one.
    How can we do this? Please provide me a solution in detail.

    hi,
    You can use user exits for this req. Take the help of your ABAPer who can assist you in finding the relevant exit and fix this as per the logic specified by you. Or you can also approach SAP Service marketplace who will provide the required data.
    hope this helps
    regards,
    radhika

  • How to make metadata fields required when creating folders

    Hello all....
    Related issue with SR 3-6472229431 and SR 3-6471130611.
    We're using DIS 11.1.6 64-bits (2011_11_29 (rev 9756) 11.1.6.97) in a Windows 7 64-bits workstation (with UCM 11.1.1.5 in a Linux machine). The check-in of images to UCM goes fine.
    I'm trying to make some metadata fields required when creating a folder. These fields are required when making a check-in, but not when creating folders.
    Folders_g is enabled. DesktopTag too.
    EDIT: Patch: 14695303 - WCC 11.1.1.5.0 BUNDLE ( MLR 16 ) NOV 6 2012 applied.
    Is it possible?
    Thanks for all.
    Edited by: fgomes on 22/11/2012 03:24

    After reading your response and rereading the original question a bit closer, the metadata prompting feature does not apply to creating new folders, only content.
    Again, though, I think the focus here is in the wrong place. The metadata applied to a folder is intended to be ultimately applied to the content. You can build global rules that fire on submission of content to check if a field has a value, and throw an error if the value is empty.
    If you expect users to create folders (and actually apply any metadata to the actual folder itself), you will be disappointed. Experience shows that users are not interested in that level of detail when creating content, let alone folders. Letting typical users create folders is a bad idea anyway, as they tend to create the same inefficient folder structures they previously created in file shares within Content Server.
    If you need to tightly control folder attributes, you'll be better served by locking down the ability to create new folders. Otherwise you're looking at some type of customization. Keep in mind that you won't be able to customize the right click behavior of DIS. Any changes to DIS would have to be an enhancement request.

  • Field STCEG required at FB01 (one-time vendor account)

    Hello,
    Does anyone know how to put the field STCEG required when posting, through FB01 or similar, to an one-time vendor account?
    Thanks!

    Hi,
    Account group field status determine the status while creating/ changing the master data.
    For posting, you can control via posting key setting or field status assigned to gl.
    As you need to make it as required only for one time vendors, so create a validation in OB28/ GGB1 for it.
    Regards,
    Gaurav

  • Printing form fields only on Reader

    Before I get to the meat, a little background.  We are in the process of converting all of our forms into PDFs so to keep everything the same across the company.  My company is a contract packager, and we ship out many items.  We have purchased forms for Bills of Lading and Packing slips that have duplicate copies for the back.
    We would like to be able to scan the form into the computer, and create a PDF with text fields to type in the information, but then only print the form field data.  Basically, I want the form to show up on the computer screen but only print the data that's entered.  With Acrobat, I can select in the printer box to print form fields only, but when I put the form on the system and tried it on a computer that only has Reader it doesn't give me the option of printing the fields only.  (I'm the only computer that has and uses Acrobat).
    I'm not a programmer of any sorts, but is there a way to have Reader do what I want it to?
    Thanks in advance for any help!
    Bret

    Hello Eveyone
    My solution for this is simple
    In Adobe Pro, go to menu bar in:
    Documente-->
    Backgroup-->
    Add and Replace or Update
    in Apperance select
    Apperance Options
    remove the check for "SHOW WHEN PRINTING"
    This solved the problem to print forms with background in your company.
    GOOD LUCK

  • Making a text field required when a radio button is clicked

    Hello all, I am very new to designing PDF forms, and I want to implement this requirement but have no idea how to go about doing it. I am designing an order form, and in a few different sections of the form are text fields that I want to be required, but only if a certain radio button on the form is clicked. So for example, I have a radio button group on the page consisting of two buttons, and then immediately to the right is a text field. If the user selects button 1, the text field is not required, but if they select button two, the text field is required. How do I implement this? I am using Livecycle ES3. And when I say required, I am referring to the field value/property of "User Entered - Required". Also, I cannot accomplish this by hiding and unhiding the field depending on which button is clicked, as this form will also be printed and filled out by hand, so all fields must be visible at all times. This form does have a submit by e-mail button and that is how it will be used primarily.
    Also, I have searched around the forums a bit, and have tried some Javascript I have found, tying it to a mouseup event on the radio button, for example "getField("Text1").required = (getField("Radio1").value == "Yes");" and "getField("Text1").required = true;" with the names changed for my fields, but no matter what I try it has no effect
    Thanks!

    i hope this helps u.You can always optimize tht code a bit more , it's coded roughly but it works.
    <html>
    <head>
    <script>
    var cursel='r1';
    function radioClick(x)
         if(cursel!=x)
              cursel=x;
         if(cursel=='r2')
              var z=document.getElementById('mydiv');
              mydiv.innerHTML='<input type=text name=ss size=20/>';
              mydiv.style.display='inline';
         else
              var z=document.getElementById('mydiv');
              mydiv.innerHTML='';
              mydiv.style.display='inline';
    </script>
    </head>
    <body>
    <form>
    <input type=radio name=rtt onClick="radioClick('r1');" checked />Radio 1
    <br>
    <input type=radio name=rtt  onClick="radioClick('r2');"/>Radio 2
    <br>
    <div id=mydiv></div>
    </form>
    </body>
    </html>

  • Fields in custom view is only populated when Edit button is clicked

    I have enhanced the component BT111H_OPPT. I added three custom views to it. I have enhanced CRMD_CUSTOMER_H with the required fields using EEWB. The context node BTCUSTOMERH is created  as a dependent node on BTADMINH. Below is the code for creating the context node.
    model = owner->create_model(
          class_name     = 'ZL_ZOPP_EXT_COMMERCIALOV_CN01'
          model_id       = 'BTCustomerH' ).                     "#EC NOTEXT
      BTCustomerH ?= model.
      CLEAR model.
    initial setting for depandant model node
      coll_wrapper =
        BTADMINH->get_collection_wrapper( ).
      TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        BTCustomerH->on_new_focus(
                     focus_bo = entity ).
      ENDIF.
    My problem is when I open a opportunity these custom view fields are all blank (intial). If I click edit button on any of the views the values get populated. If I got out of the opportunity and come back again after clicking the edit button I get my custom views populated.
    A similar entry in SDN is there but is not clear. Can anybody advice?
    Custom field only populated on edit

    Hi Arun,
        Thank you for replying. I solved the problem. In my case I have bounded the context for BTCUSTOMERH with the component controller. And compoent controller does not hold values when its loaded. I removed the binding and it worked.
    Edited by: subhashis das on Mar 5, 2010 1:31 PM
    Edited by: subhashis das on Mar 5, 2010 2:10 PM

  • Expanding Text Fields, only when printed

    All,
    I have a dynamic form that has many text fields for user input. These fields have a fixed height, however allow multiple lines beyond the visible area. I don't want these text fields to expand when the field is exited, but rather when the form is printed. The form is set up neatly on 7 pages, and I'd like it continue to be 7 when the user is working, however I'd like it to expand to accomodate the extra text upon printing.
    How can I make it so when I print, the fields expand and the data flows onto the next page(s)?
    Thanks!
    Aaron

    Thank you. I'll also have to make sure the subforms are set to "flowed" to make sure the expansion works appropriately, correct?
    I can get everything to work correctly until my last page. When flowing the subform it compresses all of my fields and won't let me resize or move. Is there any easy way to resize a subform or adjust the locations of the fields within it?

  • When I fill fields on a form and ask to print using form fields only, the infomation doesn't show up. Other people in the office use the same form with no problem. Using XI standard.

    I have a fillable form that is used by everyone in the office. When the fields are filled we print using the form fields only option to print on our invoices. When I go to print it in Acrobat XI standard using the form fields only option, none of the information I filled shows up or prints. No one else in the office has this problem. Does anyone know why I can't do this, but other people can?

    I have a fillable form that is used by everyone in the office. When the fields are filled we print using the form fields only option to print on our invoices. When I go to print it in Acrobat XI standard using the form fields only option, none of the information I filled shows up or prints. No one else in the office has this problem. Does anyone know why I can't do this, but other people can?

  • Text in completed form only appears when the cursor is placed in the field

    I created a form and sometimes when it is completed and returned to me, the fields appear blank. If I place my cursor in the field, see the text responses.  What can I do to fix this?

    It is a user issue.  This usually happens when someone uses a program other than Adobe Reader or Acrobat to fill in the form, such as Mac Preview.  You can simply put a text box on the form prompting the user to download and fill in using Adobe Reader with a link to the website OR if you do recieve a form this way you can "re show" the fields by following these steps.  (Assuming you have at least Adobe Acrobat Standard):
    Open form with hidden data.
    Go to Forms>Manage Form Data>Export Data
    Save the file as XDP.  Close the form.
    Reopen and go to:
    Forms>Manage Form Data>Import Data
    --import the XDP file you just created.
    All your fields should now be showing.  Saves time when you have an extensive form.  Keep in mind some of your data may not have auto formatting since the user did not use Adobe to fill in the form and some fields may require "cleaning up."
    Brenda

  • Some fields in form not printing but do print when printing fields only

    Hope that someone can help with this. I have filled in some forms (supplied by a third party) and when I print these forms the content of some fields are printed, and some are not. I have found out that if I cut a field's content, then paste into the same field, then tab out of the field, then the field content will be printed. I have about 20 of these forms with a lot of fields, so I would prefer another solution ;-)
    The strange thing is, when I choose to print fields only (I have Dutch version of Acrobat, not sure if it has that exact name in English) ALL fields are printed correctly!
    I have scanned the forums and tried several printing options, including printing as image.
    I have tried using Acrobat 8.1.6 Standard on Windows (at the office) and the latest Acrobat Reader on both Ubuntu Linux and Mac OSX (at home) with the same results.
    Any suggestions?
    thanks
    Paul

    The first time I chatted with iTunes support they ended it by giving me 2 free song downloads. No offense, but I don't want to download anything but what I've already paid for. The second person to help me through email support gave me 6 free song downloads. This is frustrating because neither can offer a solution to why iTunes says 6 of this album's tracks are downloaded to my computer and won't allow me to redownload them... BUT on another device I can redownload the album in its entirety. That sounds like a very technical question that I just don't think they train their support staff to handle.
    So, does anyone know how I can get this computer to UNRECOGNIZE these songs as downloaded, thus allowing me to download the full album to this computer?!

  • Why cant i open all my bookmarks in a new tab? only the ones visible above me, not the ones that show up when i click in the arrow to the upper right?

    why cant i open all my bookmarks in a new tab? only the ones visible above me, not the ones that show up when i click in the arrow to the upper right?

    Uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox that prevents new tabs from being opened.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

  • HCM F&P - How to set the field as Required based on drop down values

    Hi Experts,
    I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
    Thanks & Regards,
    Jitesh Talreja

    Thanks for your valuable inputs
    Chintan
    I have already tried this. It only highlight the field with the red border but still allow to move further.
    Mukesh
    Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
    Poornima
    By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
    Regards,
    Jitesh Talreja

Maybe you are looking for

  • I can't turn on my ipad 3rd gen after upgrading to ios 7.0.2

    my ipad 3rd gen run good using ios 6.XX then last sept i just found an update from my ipad and tries to update with good connection of internet. after upgrading it restarts and a few minutes of using with FB it reboot it self and i can't even turn-it

  • Cond display of drop down based on value selected in another drop down form

    Hi, I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list... Currently I have 2 drop downs. First drop down is a list of Jacks f

  • Java stored procedure failes to create.

    Hi All, I have a java program with following import statement. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.MalformedURLException; import java.net.URL;

  • Non-numeric character in a directory or speed dial number

    I'm using an SPA504G to connect directly to my VOIP 'virtual PBX' service provided by voipfone.co.uk. Each virtual extension is of the form 12345678*200 or 12345678*201 etc, but I can't get the phone to dial these numbers, presumably because of the '

  • Screen turns bright white while display freezes? Any one know why?

    The screen freezes and gets brighter and brighter until it becomes all white. If I move the screen of the laptop the display returns to normal for a brief second then starts turning white all over again. Anyone know what the problem could be? I have