Making fields required based on other field input

I am creating a form in adobe acrobat pro that employees need to fill in to show the clients they have worked for in a week. The form has 10 lines for them to fill in the date, client name, address etc for 10 clients. I want to make the client name and address fields required only if the date has been filled in in the first column. I can't make every row required fields as they may not have 10 clients that they have worked for. I have a send button set up so that all required fields are completed before the form can be sent. Can someone help me with the script I would need. I have worked out how to make the fields required if a check box is ticked but can't find any scripting for fields to be required if text has been entered in a specific field.

You can use the custom validation script of the date fields. Let's say you
want to make Name1 and Address1 required if Date1 is not empty.
Use this code to do it:
this.getField("Name1").required = event.value!="";
this.getField("Address1").required = event.value!="";

Similar Messages

  • Setting fields mandatory based on other fields

    Hi,
    In my adobe form there are 4 input fields(F1,F2,F3 and F4) and one field(F5) which is input optional. But if any field (F1, F2,F3 or F4) gets changed, the fifth field F5 has to be mandatory. I guess some java scrip is required but I dont have any idea on the same.
    Please help.

    we have a similar situation where a field must be filled in if a value is chosen in our dropdown box.
    you can throw a popup message stating that the field must be filled...
    JavaScript
    xfa.host.messageBox("This is a message", 3, 1);
    FormCalc
    xfa.host.messageBox("This is a message", 3, 1)
    A valid integer representing the value of the button pressed by the user:
    u2022 1 (OK)
    u2022 2 (Cancel)
    u2022 3 (No)
    u2022 4 (Yes)
    Or what we did is just checked all the values after the SUBMIT and issued error messages in a message area letting the user know what they missed.

  • How to make Multi Select Picklist Field Required Based on another field

    Hi,
    I want to make one filed which is Multi select Required(mandatory) based on certain value in another filed.
    I tried putting IIf([<FieldNAme>]> 1000 AND [<FiledNAme1>] IS NULL,"Invalid",[<FieldNAme>]) in the Field validatation as but it is not working.
    Please suggest any workaround available.
    Warm Regards
    Pramod
    Edited by: user11361975 on Jun 3, 2011 5:03 AM

    I guess FieldName1 is the multiselect picklist you are referring to?
    Where did you get the ITAG from? I don't see any multiselect picklists available in Expression Builder. I doubt whether you can set validations on multi select picklists at all.
    If anyone has achieved this please let me know as well.
    Regards,
    Udaya

  • Make one field required based on another field

    I am trying to set a form up, so that when a check box is marked, then the corresponding date field is required.  I set the script language to Javascript and entered this script: 
    if 
    (this.rawValue == "1") (PROPOSALDATE.mandatory = "error")
    However, I get an error message stating "syntax error near toekn '!' on line 1, column 20."  There is no ! in this script, so I don't know what it is talking about.  What am I doing wrong?

    Hi,
    The script that executes if the statement is true should be inside curly brackets. So the following in the click event of the checkbox should work:
    if (this.rawValue == "1")
         PROPOSALDATE.mandatory = "error";
    else
         PROPOSALDATE.mandatory = "disabled";
    The above is Javascript.
    Hope that helps,
    Niall
    Assure Dynamics

  • Automatically populate fields in jsp documents based on other fields

    hello guys. I have a jsp document
    that has the following
    <af:inputText value="#{bindings.SourceDocumentId.inputValue}"
    label="#{bindings.SourceDocumentId.label}"
    required="#{bindings.SourceDocumentId.mandatory}"
    columns="#{bindings.SourceDocumentId.displayWidth}"
    binding="#{backing_transactions_editTransactions.docId}"
    id="docId">
    <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SourceDocumentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DocumentName.inputValue}"
    label="#{bindings.DocumentName.label}"
    required="#{bindings.DocumentName.mandatory}"
    columns="#{bindings.DocumentName.displayWidth}"
    binding="#{backing_transactions_editTransactions.docName}"
    id="docName">
    <af:validator binding="#{bindings.DocumentName.validator}"/>
    </af:inputText>
    And I have created the generated the backing beans automatically.
    public class EditTransactions {
    private CoreInputText docId;
    private CoreInputText docName;
    public CoreInputText getDocId() {
    return docId;
    public void setDocName(CoreInputText inputText7) {
    this.docName = inputText7;
    public CoreInputText getDocName() {
    return docName;
    I have a method in appmodule that has this
    public String getDocName(Number docId)
    {String docName;
    return docName
    on the document Id field I have to input a certain docId after I input the docId I have to populate automatically the docName based on the doc Id being given.
    question
    1. how can I set the document name automatically w/out submitting the page ?
    2. how can I use my backing bean to set the docName using the method in my AppModule.?
    Can anyone help me regarding this one.
    Thank in advance
    alvin.

A: automatically populate fields in jsp documents based on other fields

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

  • Making a DFF field mandatory based on another field

    Hello All,
    We have a requirement where in we need to make a DFF field mandatory based on another field.
    example:
    DFF has two fields :
    Filed1 : values 'Email', 'Fax'
    Filed2
    If 'Email' is selected in 'Field1' then Field2 should become mandatory.
    Any inputs on this will be really helpful.
    Thanks & Regards,
    Satya.

    hi kumar3a,
    recently, i spent considerable amount of time wracking my brain on a similar problem. the nearest i came to a solution was when i used a forms personalisation. mind you, forms personalisation will not work directly on the DFF window, so it has to be approached in a roundabout sort of way.
    i got this information from an Oracle Support personnel - MOS Note 1078348.1.
    i would start with the flexfield segment as "not required", and then using Forms Personalization, i would make it "required". i would try to figure out how to establish a condition where the previous 'required' flexfield segment's value is checked to see if this 'not required' segment needs to be made 'required'. in theory, this should solve the issue. i gave up on it because the forms personalisation would need to cover WHEN-VALIDATE trigger event, and we had close to 100 validations going on through other preexisting forms personalisations, which rendered it near impossible to employ this method.
    best regards.

  • Form Personalization - Make field required based on LOV selection

    Newbie here.
    I am trying to make a field required based on the selection of the LOV that is next to it. Having a heck of a time with it.
    The form i am working on is the Sub Invenntory form that you get to via Organization Items. We want the subinvnetory field to be manditory when subinv is selected from the LOV in the sources tab.
    here is what i have so far:
    CONDITION
    Trigger Event: WHEN-VALIDATE-RECORD
    Trigger Obj: ITEM_SUBINVENTORIES
    Condition: ${item.item_subinventories.SOURCE_TYPE.value} = 3
    Action
    Type: Property
    Object Type: Item
    Target Object: ITEM_SUBINVENTORIES.SOURCE_SUBINVENTORY
    Property Name: REQUIRED
    Value: TRUE
    The problem seems to be that i can't get the field to be required. It shows up yellow but still allows me to save w/ the field being blank.

    I do not know about the particular form that you are trying to personalize, but whenever I have created a condition, it has usually been in the following syntax:
    :BLOCK_NAME.FIELD_NAME = 'VALUE'
    For example, :MTL_SYSTEM_ITEMS.PRIMARY_UNIT_OF_MEASURE_MIR = 'SEAT'
    Yours seems to be very much different from mine, but then again, I am not technical so I cannot comment intelligently on that aspect.
    May be that is the problem.
    Also, once you get it to work, you might want to also add a condition where the field is turned to un-required when the SOURCE_TYPE is NOT 3.

  • PM Notification - Hide fields based on other field's value

    Hello experts,
    I am looking for an user exit which allows me to hide some fields based on other field's value.
    For example, I have field 1 and field 2. When I open my notification, if the value of field 2 is 'aaa', field 1 has to be hidden.
    There should be an user exit but I can't find it...
    Thanks for your help!

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Make a field required based on input in another field

    So I have researched the forum to answer the question of how to make certain fields in a form required if a value is entered in another designated field, and not required if no value is entered in the designated field.
    For example:
    There is a field titled QTY_paper, and if a value is entered into QTY_paper, then the field PROGRow1 should become required.
    If no value is entered into QTY_paper, then PROGRow1 is not required.
    I've tried both FormCalc and Javascript, but with no results. In FormCalc I added this script as a mouseExit event on QTY_paper:
    if ($.isNull == 0) then
         //Make the budget field Required
         PROGRow1.validate.nullTest = "error";
    endif
    and then I added this script in FormCalc to the mouseExit event on PROGRow1:
    if ($.isNull == 0) then
    $.validate.nullTest = "disabled"
    endif
    This came almost verbatim from another post on the forum, so I'm thinking I'm missing something obvious here... which isn't too odd as I'm still pretty new at adding the scripts. Please help if you can!

    You'd want to combine both scripts on the first field with an if/else statement. And I'd use the Exit event instead of Mouse Exit (not sure if Mouse Exit handles tabbing in and out of fields).
    The first script should have worked, but with the second script you were asking if PROGRow1 was null, not QTY_paper.
    FormCalc:
    if ($.isNull) then
         PROGRow1.validate.nullTest = "error"
    else
         PROGRow1.validate.nullTest = "disabled"
    endif

  • Fields required based on a value in another field

    Hi,
    I am looking to have fields required (Annual Revenues and # of Employees) based on the value of another field (Ownership). Basically, if the value is Public the user is required to enter the Annual Revenue and Employees fields. I thought about using dynamic layouts but the only key field for Accounts is Account Type.
    Thanks,
    Caryn

    Hi Caryn!
    I think it is not possible for making #Employees and Revenues required depending on Ownership(as it is a look up field).. it should be possible if you want to do it on any other criteria other than ownership by just renaming the Account Type, Disable all the values of Account Tyope add new values to Pick List and make it driving picklist upon your requirements..
    If you require Account Type, create a custom picklist "Account-Type" and add the values.

  • Infopackage Abap Routine (Selection based on other fields?)

    Dear Friends,
    I know that Abap routine is used in infopackage to select or restrict using complex data selection.
    My requirement is to restrict Material no field based on 4 other fields. Is that possible?
    Actual condition is  to load Material no only if other 4 fields combination is new.
    Pls help.
    Guru

    Hi,
    Yes you can do this at infoPackage level using the ABAP routine.
    First read the Active Table of the DSO into internal table and do a lookup for the required four fields combination.
    If these four field are new allow the material number.
    Refer the below link for more help.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a05ac9fa-f44c-2c10-dbb8-ef54c102707c
    Regards
    Manjula.B

  • Fill DDL based on other field values in offline interactive adobe form

    Hi,
    I have a requirement where in i need to fill the values for a dropdown list  based on 3 other field values in offline adobe interactive forms which uses web service to interact with SAP.
    Note: I read many blogs and posts in SDN , but couldn get much info ab the same, so posting a new thread.
    Thank you.
    Regards,
    Soumya

    Hi Soumya,
    It is possible but a little bit tough and will make your form heavier.
    The solution is advisable only when there is not very much data required for the drop down(May be not more than 500 values as it will create performance issue).
    You can create a hidden table on the form contaning data for all the combinations. Depending on the selection of another 3 fields you can write the code to select only those values from this hidden table which are applicable to that selection. These values you can add to the drop down list removing the previous values.
    Only you have to do is on calculate or vlaidate event of target DDL you have to write your code.
    Pseudocode:
    1. Clear your DDL using deleteItem() method.
    2. Loop at your hidden table.
    3. Inside the loop check for applicable entries depending on selection in other 3 fields.
    4. Select the appropriate vlaues
    5. Add using additem method().
    Refer formCalc or JavaScript help for the appropriate code.
    Hope this will be helpfull.
    Regards,
    Vaibhav

  • Data in one field requires data in another field

    I am trying to build a form that forces data entry (text)
    into a field if a previous ( or other ) field has data in it.
    Example: If there is data in the "Full Name" block, you have
    to put data in the "Crew Name" block.
    If the "Crew Name" block contains data, all is fine,
    otherwise an error message is created.
    Also, how do I validate this ( is it even required ? )
    Thanks ! ~The Noob~

    Droto wrote:
    > I am trying to build a form that forces data entry
    (text) into a field if a
    > previous ( or other ) field has data in it.
    > Example: If there is data in the "Full Name" block, you
    have to put data in
    > the "Crew Name" block.
    > If the "Crew Name" block contains data, all is fine,
    otherwise an error
    > message is created.
    > Also, how do I validate this ( is it even required ? )
    > Thanks ! ~The Noob~
    >
    Are you saying that "Full Name" is not required? But if there
    is data in
    the "Full Name" field, then "Crew Name" is required?
    Mick

  • How to find field name based on screen field name

    Hi all,
    I need to find field name at run time based on screen field name for doing some check.
    Eg, if i have P_CUST on screeen which refers to KUNNR . Then i should be able to find KUNNR based on screen name ie P_CUST during run time.
    Thanks in advance.
    Thanks and Regards,
    Taranam

    Hi
    ex:
    PARAMETERS :
      p_carrid LIKE spfli-carrid,
      p_connid LIKE spfli-connid.
    DATA:
      T_DYNPRO TYPE
      STANDARD TABLE
            OF DYNPREAD
          WITH HEADER LINE,
      W_PROG LIKE D020S-PROG,
      W_DYNP LIKE D020S-DNUM.
    CLEAR: FIELD_VALUE, T_DYNPRO.
      FIELD_VALUE-FIELDNAME = 'P_CARRID'.
      APPEND FIELD_VALUE TO T_DYNPRO.
    w_prog = sy-repid.
    w_dynp = sy-dynnr.
    ***TO READ VALUES on screen
    CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME                   = W_PROG
                DYNUMB                   = W_DYNP
                TRANSLATE_TO_UPPER       = 'X'
           TABLES
                DYNPFIELDS               =  T_DYNPRO.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • How to default the KFF segment values based on other field's value

    Hi,
    I would need to reset the 5th segment value of "Liability Account" field on R12 Supplier Page under "Accounting" link.
    Condition: And it has to be based on some other value like "GLOBAL CONTEXT VALUE and TaxPayer ID Type" under "Organization" link.
    Right now; as per the seeded page it defaults the Liability Account to "BL-130-0000-2110-0000-0000" under accounting link; I need to change this default value to "BL-130-0000-2110-2641-0000" based on above condition.
    I have tried using the below code:
    OAKeyFlexBean oakeyflexbean = (OAKeyFlexBean)oawebbean.findIndexedChildRecursive("LiabilityFlex");
    oakeyflexbean.setText()
    But this one does not work.
    Can anyone suggest me some option to acheive this requirement.
    Thanks
    Edited by: 880860 on May 21, 2012 2:23 PM

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Maybe you are looking for