Make it a required field based on another field

I am creating a form, so that when a check box is selected, then the corresponding date field is required.  I put the Javascript scripting language and entered this script:

If

(this.rawValue == '1') (PROPOSALDATE.mandatory = "error")

However, I get an error message indicating "near toekn syntax error '!' on line 1, column 20.»  There is not! in this script, so I don't know what he's talking about.  What I am doing wrong?

Hello

The script that runs if the statement is true should be inside the curly brackets. Thus, the following text in the click event of the checkbox should work:

if (this.rawValue == "1")
{
     PROPOSALDATE.mandatory = "error";
}
else
{
     PROPOSALDATE.mandatory = "disabled";
}

The foregoing is Javascript.

Hope that helps,

Niall

Ensure the dynamics

Tags: Adobe LiveCycle

Similar Questions

  • Make it a required field based on entry into another area

    So I did search the forum for answering the question of how do some fields in a required form if a value is entered in another field designated and not required if no value is entered in the corresponding field.

    For example:

    There is a field called QTY_paper, and if a value is entered in QTY_paper, then the PROGRow1 field should be required.

    If no value is entered in QTY_paper, then PROGRow1 is not necessary.

    I tried both FormCalc and Javascript, but without any result. In FormCalc, I added this script as a mouseExit on QTY_paper event:

    If ($.isNull == 0) then

    Make the required field
    PROGRow1.validate.nullTest = 'error ';
    endif

    and then I added this script in FormCalc to mouseExit on PROGRow1 event:

    If ($.isNull == 0) then

    $. validate.nullTest = "disabled".

    endif

    This happened almost word for Word from another post on the forum, so I think I'm missing something obvious here... which is weird because I'm still pretty new by adding scripts. Please help if you can!

    Yes a lot of dynamic things is not taken in charge in static PDF files, stuff works and many do not work. What a pity that you can not rebuild the form.

    While the border color does not change, the field can still be getting the required value, and so it can still work as a required field.

    The other alternative would be to make all fields and scripting in Acrobat.

  • makes the other required fields

    If I select a checkbox, I want to do a drop down field required.

    Use this code as the mouse script to the top of the box (adjust the name of the field in the code to match real field name in your file):

    this.getField("Dropdown1").required = (event.target.value!="Off");
    
  • Make it a required field? Not part of the quiz.

    Hello, I don't see an option for this. I tried Googling, but I get no relevant results.

    In all the properties on the right side, the only one I see that would come close is "validating user input". But it's only against the words that I chose, I make sure they enter their name in the user name box if I can use their name throughout my presentation. It's Captivate 5.

    Thank you

    Hello

    You want to only check whether something worthwhile has been entered in the field? Don't not to check if it was the right name?

    If this is your question: a variable user a link to the text entry area. I'll label it v_name if you don't know how, I have explained in this blog:

    Create a user variable while creating a TEB

    It is a possible workflow:

    • Start by defining the contents of the variable to something that can never be a name. You can make it into something assigning entering the slide, or putting a default value in the variable definition (I prefer the first way, because it will be less confusing for the user).
    • When the user clicks on the submit (BER) or use the shortcut key for the opening of his typing, bind an Advanced button action "submit":
      • checks if the variable v_name is different from content, he had
      • If Yes, go
      • If not: rewind the playback head, display a text caption that insists on entering a name

    Lilybiri

  • I need to make a required field 'A' if the user selects "OFF" in a ON / OFF dropdown

    I need to make it a required field 'A' if the user selects 'OFF' in a drop-down list box ON / OFF.

    Ideally, I would like to make several required fields - A, B, C, D, but I limit myself to one if someone can help me please.

    You must run a JavaScript script for action 'the blur '.

    If (event.value == "OFF") {}

    this.getField("A").required = true;

    this.getField("B").required = true;

    this.getField("C").required = true;

    } else {}

    this.getField("A").required = false;

    this.getField("B").required = false;

    this.getField("C").required = false;

    }

  • Make a mandatory DFF field based on another field

    Hi all

    We have a requirement where we need to do a mandatory DFF field based on another field.

    example:

    FDF has two fields:

    Depose1: the values 'Email', 'Fax '.
    Depose2

    If "Email" is selected in 'Field1' Field2 should become mandatory.

    All entries on this will be really useful.

    Thank you and best regards,
    Satya.

    Please see old topics that cover the same subject - http://forums.oracle.com/forums/search.jspa?threadID=&q=DFF+AND+mandatory+ANd+Dependant&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001

    Thank you
    Hussein

  • Hi, PDF form of the guru. How to make a text box become a required field IF a drop-down list is selected as the "Yes"?

    Hi, PDF form of the guru.

    How to make a text box becomes a "required field", IF a drop-down list is selected as the "Yes"?

    and 'not required' if the drop down menu selected as 'No' or left blank.

    Any help would be greatly appreciated

    see you soon

    Use this code in the custom drop-down list field validation script:

    this.getField("Text1").required = (event.value == "Yes");

    (Change "Text1" to the actual name of your text field, of course)

  • How can I make a button to be interactive so when its checked or clicked, the next tab fields become required field?

    I'm trying to create a form that contains a button to select a credit card or check.  When someone chooses the credit card, I need to become a required credit card information fields.  In the contrary case, it they select check, all the fields of credit card (number, exp. date, security code...) to be non-mandatory field.

    Why use a button. If you have a checkbox or a radio button, you can use the available actions for one of these fields to adjust the properties of the fields depending on what widget in the Group has been selected that can be to make the required, visible and required fields and then reset/clear the other group of fields, do so in read-only and disabled the requirement.

  • Make a mandatory item based on another article

    Hi all

    I'm having a problem while doing a required field in a table. I use following code when validating trigger:

    If: XXONT_ABC.ORG IS NOT NULL THEN
    set_item_property('XXONT_ABC.) WASHING "(, EXIGE, PROPERTY_TRUE);"
    end if;

    This code makes the other XXONT_ABC field. WASH required but when I move down to 2nd row, yet it is mandatory for 2nd place while I'm not entered any value in XXONT_ABC.ORG.

    Please suggest.

    Thank you.

    Published by: Amit1cs on May 16, 2013 15:22

    Hello

    did you try with set_item_instance_property. Try this.

    Concerning
    Sri

  • Make sure that "required" before "Signature" AND check that "signature" is completed before you 'submit', the fields are comeplete


    The people there, I am fairly new to create forms but starting to get the hang of it.

    I'm trying to make sure that when people sign my form fields that I put as 'compulsory' are comeplted. Currently my form does not :-(

    I have a "submit" button at the bottom of the form that I set up to E-mail the form validated at a defined person, however, I want to make sure when you press this button, there is a check to ensure that the form has been signed and that the 'required' fields have been comeplted.

    Ideas are very welcome!

    Thank you

    Chris.

    Apologies! Thank you very much for your help! The code you posted earlier, I found is:

    var emptyFields = [];

    for (var i = 0; i)

    var f = this.getField (this.getNthFieldName (i));

    If (f.type! = "button" & f.required ") {}

    If ((f.type=="text" && f.value== "") |) (f.type=="checkbox" && f.value=="Off")) emptyFields.push (f.name);

    }

    }

    If {(emptyFields.length>0)}

    App.Alert ("error! ("You must fill in the following fields: \n" + emptyFields.join ("\n"));

    }

  • Choose field from the joined table based on another field?

    Hello!

    Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
    ID  C1   C2    C3    C4    C5    C6
    T1  9.6  10.3  12.4  19.6  19.6    0
    T7  9.6  10.4     0     0     0    0
    T3  8.2   9.9  11.4  19.6  19.6    0
    T8  8.3  10.7  13.5  20.7     0    0
    T5  9.4  10.3  12.7  22.9  19.6    0
    ...
    And the following data in the table MDETAIL:
    ID           MDATE        CNUM     ...
    T1  03/28/2012 18:00:00    4
    T1  03/28/2012 18:00:00    1
    T8  03/29/2012 06:00:00    6
    T8  03/29/2012 06:00:00    5
    ...
    I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:
    SELECT m.t1, m.mdate,
           CASE WHEN m.cnum = 1 THEN c.c1
                WHEN m.cnum = 2 THEN c.c2
                WHEN m.cnum = 3 THEN c.c3
                WHEN m.cnum = 4 THEN c.c4
                WHEN m.cnum = 5 THEN c.c5
                WHEN m.cnum = 6 THEN c.c6 END AS cvalue
      FROM mdetail m
      JOIN cvalues c ON m.id = c.id
    The CVALUES table records are unique; only one line by ID.

    This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!

    Hello

    With a decoding it would be easier, but as ugly :-)

    SELECT m.t1, m.mdate,
           DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue
      FROM mdetail m, cvalues c
      WHERE m.id = c.id
    

    Success!

    FJFranken

  • How to make a required field in OAFramework

    How to make a required field in OAFramework when running? Please explain in detail if possible.

    Thank you
    Kumar

    Get the handle to the bean by using the following Code

    Bean = webBean.findIndexedChildRecursive ("");
    If (bean! = null & )
    {
    bean.setRequired (true);
    }

  • How can I make a radial box group a required field in a form?

    My form has yes/no questions that I want to demand an answer. I created a radial button group. How do I make a file required on the form?

    Thank you.

    Kay

    If you use HTML5 forms, you can simply add '' necessary '' to one of the option buttons in each group...

  • Required fields

    Given:

    form with several fields of text entry.

    the value of LOV some fields becomes invalid - not required for the operation.

    To submit:

    pl/sql procedure takes values of all the elements and, based on the values passed did he magic.

    Problem:

    required fields are marked as "required" in the apex. When LOV disables them, of course, they have a value, and a problem during "submit page" (e.g..

    "First Name must have some value. »).

    I'm hesitant to mark all items as 'non-compulsory' unceremoniously since all the elements are necessary (when they are activated by LOV) and the Red "*" is a good way to remind a user to enter a value.

    What would be a better solution?

    hope it makes sense

    P.S. help to 'Value' for the element leads to believe that 2 conditions must be met so that automatic checking of ' not null ' kick - point must be visible and '' necessary '' status = "YES". This is not true. required = yes and "point invisible triggers still control null nit.

    AZZ,

    You can set the attribute 'Required value' = 'No' and let the model as "Necessary", it will show the "*" when the element is visible. Then you can create a new type Validation "IS NOT NULL" to a Condition of ' Item = value '.

    Thank you

    Erick

  • Mark a required field in Oracle BPM

    Hello

    I want to mark a field as required in Oracle BPM ADF UI but I am unable to do so as we do in Oracle ADF. So whenever an initiator completes the form and if it leaves an empty field, its application should not be submitted. Please see the attachment snap for detail, thank you very much

    RequiredField.PNG

    The simplest solution is just to type "true" (without the quotes) in the field of the "Required" property for the field office on the form.

    Note that the field 'Account Nature' is already a field required on the form.  If your human task data XSD based, here's how you can make sure that 'Office' is a required field on all forms where it is placed.  First of all, note that your "AccountNature" is already a field required on the form.  The reason is that the item in your XSD for AccountNature probably looks like this:

    If you look at your 'Office' in the XSD element, however, it probably looks like this:

    Delete 'minOccurs = "0" ' for this item before generating the shape of the human task and this field will be also necessary.

    Dan

Maybe you are looking for

  • How to fix error of disconnection of whatsapp on iphone?

    many times it happens, but got fixbut this time it's not!What should do?

  • Help to remove Bing

    I get messages from Bing to delete Bing.  I tried everywhich way that anyone can think.  It must be a Virus and I am protected. I'm on Google.  I want Bing to my computer and it please tell me how to do it.  I'm tired messages get from them to remove

  • Some graphs showing the color white or invisible while playing games

    Hello I juz hv bought a new pc with Windows 7, 64 bit. Graphics card is MSI hawk 1 G. However, while playing the game, some of the graphic is of white color and part is invisible. 2 same items side by side, 1 with a normal image, the other is white.

  • Cannot access account administrater

    Please help someone, I can't access my administrater account so I can't remove applications material if my pc goes very slowly I allso had failed upward if it help id be very gratefull if someone could help thank you kenny.

  • At startup an error message "JVM interrupted due to an internal error.

    When this message is approved, a new message appears in a window titled "Microsoft visual c ++ runtime library" who says "this application has requested execution to terminate in an unusual way.