Make "necessary" to help if field statement

Hello

This may be really trivial for someone, but I'm doing a text field 1 becomes a required field if someone ticks box 1. This is how far I got:

var a = this.getField ("box 1");

var two = this.getField ("text box 1");

If (one.value == 'True') {two.mandatory = 'error'} else {two.mandatory = "disabled"};

I entered it as a mouse in action in the box. There is no errors when I did it, but it is not the field is a required field.

Also; It would be a similar script if I wanted to make the field visible/hidden with a checkbox using .its presence = "hidden" / .its presence = "visible"?

Any help appreciated!

OK, some code you use is intended to be used with a form created in LiveCycle Designer. It could be something like the following for an acroform:

Script mouse upwards to the box

Get a reference to the text field

var f is getField ("text 1" box);.

Set several properties for field based on the State of this checkbox

If (event.target.value = 'Off') {}

f.Required = false;

f.Display = display.hidden;

f.Value = "";

} else {}

f.Required = true;

f.Display = display.visible;

}

This assumes that you want the script that will be triggered when the user activates / turns off the check box and the name of the text field is exactly "text box 1. Note that this code sets the value of a blank text field when the checkbox is not selected, which is normally a good thing to do.

Tags: Acrobat

Similar Questions

  • newly installed windows xp home updates are not installing. error 0 * 80240036 & 0 * 80244019 make their appearance, help to solve.

    Dear Sir/Madam,

    I installed MS XP HOME in my PC, but the updates are not installing. error 0 * 80240036 & 0 * 80244019 make their appearance, help to solve.

    Kind regards

    Joseph

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_update/new-install-Windows-XP-Home-cant-get-updates-i-get/bbfa786f-40B2-4419-85DD-ba718b674716

    Look at the tricky300 post in this thread.

  • How can I make the popup with empty fields and create new record?

    I would use a popup create new record.
    I created an af:popup drag and drop a data control VO in jsff. Then, I created a button and place an af:showPopupBehavior. I was able to pop-up window by clicking on the button.
    However, the window filled with information from the record 1. and when I select a record in the table and click on the popup, the popup is filled with this record.
    How can I make the popup with empty fields and create a new record by recording the popup?
    Thank you

    Hello

    You must call the CreateInsert for the underlying ViewObject operation when opening the popup because it does not allow to clear the input field, you must have a new record created

    Frank

  • My MSN software keeps putting in place a box saying that MSN is "problems and has disconnect..." I was unable to make necessary transactions since 09:00 this morning. Help!

    It seems that MSN is either not read or do not fix the errors in the error report sent earlier today when he disabled my ability to read emails, send emails go to Web sites, etc.  A box comes up in the middle of the screen of the computer saying that MSN disconnect due to problems and they are "sorry for the inconvenience"... it's not enough not to be sorry, the problem must be corrected... After this box comes up the screen comes back to my screen saver...

    Hello

    1. Once you get this error message?

    This looks like a corrupted database or crash of the customer.

    I suggest you get it contact MSN Support.

    Here is the link,

    Support MSN:

    https://support.MSN.com/?scrx=1

  • JavaScript: Help with IF statement

    I'm not familiar with Java and I fight with this IF statement and I can't make it work.  I'm sure it's something pretty basic.  Can anyone help?  I tried everything, seeminly.  In this example below I'm checking if the data that the user has entered in the field of the AAA FAVOR and if it is then put in place a message and if not then set up another message.  My top node in my hierarchy is data, and then I have a MainSubform and a Contact02Subform.  I have this code attached to a button and notthing happens when I click the button.  If I delete the statement and have just the box of message by itself, then it will display the message box.  So I know that's my statement and I'm sure it's simple.  Help please?

    If

    (xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR").rawValue == 'AAA')

    {

    xfa.host.messageBox ("my IF");

    else ;

    xfa.host.messageBox ("my ELSE");

    endif;

    Try this.

    If (rawValue. xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR") is 'AAA')

    {

    xfa.host.messageBox ("my IF");

    }

    on the other

    {

    xfa.host.messageBox ("my ELSE");

    }

    endif is used in FormCalc are generally not in JavaScript.

    Thank you

    Sidonie.

  • How to make a checkbox address autopopulate fields in Acrobat Pro?

    I have created a form where the user would fill in their contact information. (address, phone, e-mail, etc.).

    Then, they will have to fill in their shipping address too.  I would like to have a checkbox so when activated, it would be autopopulate the forwarding address in the fields with the coordinated field entries (copy).

    It seems that I have to add javascript somehow, but nothing I found on the forum has helped so far.

    You will need to write custom JavaScript to perform the task, and you will need to know the exact form field names.

    For the box, you'll need to encode a mouse action run JavaScript and you need to add the JavaScript code. The code must check the value of the check box and fill in the fields or clear fields. Without more details, it is hard to tell you how to program your specific form. If the design of the form, I would have used the names of field Manager for the invoice and shipping fields. So we can have "invoice.company", "invoice.contact", 'invoice.address', 'invoice.city', 'invoice.province', 'invoice.postal', 'invoice.phone', 'invoice.fax' and 'invoice.email'. The fields of the expedition would have a highest level of "shipping" name and the same children field names.

    A possible script could then be:

    var oInvoice = this.getField ("invoice"); get the top-level field;
    var aInvoice = oInvoice.getArray (); make table of child fields;
    order var = this.getField ("shipping");
    var aShipping = oShipping.getArray ();
    Console.println (this.getField (Event.Target.Name) .value);
    If (this.getField (event.target.name) .value == 'Yes') {}
    for {(i in aInvoice)
    Copy children Bill in the fields of shipping;
    aShipping [i] .value = aInvoice [i] .valueAsString;
    }
    oShipping.readonly = true; do shipping readonly;
    } else {}
    oShipping.readonly = false; clear readonly
    this.resetForm ([oShipping.name]) / / reset table shipping fields;
    }

  • Help beginners - if statements?

    Hi guys,.

    I am new to creating forms. I'm trying to make my business more electronic and professional by getting my mechanics to use pdf forms to complete service sheets (we are in the business of truck repair).

    I enclose the worksheet I'm trying to convert a form. When I need help, is that I have a drop down list with all my names of mechanics (the list is visible on the screen only, not print). The names are in the format of the first and the last. Before completing the checklist of items, the mechanic must complete the top portion of the form.

    You can see that I did a checkbox, drop down and 'read only' next 'Instruments and Gadgets. How I wish it works, is that the mechanic will check the check box if the item is "correct". After him by clicking on the box, I would like to than the textbox 'read only' to fill his initials under "I.D.". For example, if Chris Antolick was chosen as the mechanic in the large drop-down list, and Chris checks out 'Instruments and Gadgets', I would like to that CA to fill the read-only box on this line. I would like also to this same box to fill with his initials if he makes a selection in the drop-down list next to the box instead of the box (for example, if he chooses "X - a need of repair", then his initials will fill the reading only one box).

    I would also like to have the initials of mechanics immediately appear at the bottom of page 2 in read only box located on the "Initials" line as soon as the mechanic is selected in the drop-down list at the top of page 1.

    I'm more used to Microsoft Access forms and I would have used if instructions to do that here, but I don't think that it is even remotely close to language?

    I understand that this is probably some tricky coding, but if someone could help me out that would be very, very, very much appreciated.

    The form can be found here: http://motorcyclesaddlebags.bravehost.com/form1.pdf

    Thank you!!

    Plesae find attached an amended version of your form. I've adjusted your mechanic DDList to display the name of the mechanic, but use the initials as the declared value. See the link of the mechanic DDList tab. I also added the code box and the list of codes to enter the ID with the correct value. The fact tthat you had the field technician and mechanic field defined as global linking makes the declared value is displayed automatically. You will run out of space in the Code column to a DD and a checkbox control... .so I added OK to SD option in the second line to show you how this could work.

    Let me know what you think... . If you want me to remove your form of this post, just let meknow and I will.

    Paul

  • Make it visible only works field in the first row, not added lines

    I have a dynamic form that I can add lines. It is 3 columns, the first being a DOF that fills the second column DDL. The 3rd column is a hidden field that shows once made a choice in the second DDL. It works very well in the original line, but it will become visible in the rows that are added.

    This is my code for the second DDL:

    If

    (this.rawValue ! = 1)

    {

    Form1. Page1.OrderSection.OrderItems.condition.presence

    = 'visible ';

    }

    on the other

    {

    Form1. Page1.OrderSection.OrderItems.condition.presence

    = 'hidden ';

    }

    Must be set up as a sort of loop maybe? I'm sure it has something to do with my being a dynamic path name path. Not really sure at this point what to look at to make it work. I don't know how or if I can get my file here. If someone can tell me how to fix it, or I can email to someone for help.

    Thanks in advance.

    Each object must have a unique name. To accomplish the repeating subform Gets a number of occurrence, so assuming the OrderItems is the repeated subform expression to get the object will be OrderItems [occuranceNumber]. Condition

    If you need to change your code to access the instance on the right:

    'visible ';

    xfa.resolveNode ("form1. ("Page1.OrderSection.OrderItems [' + this.parent.index + '"] '). Condition.presence =

    Assuming that you are running this code on an object inside the subform. The this.parent.index will give you the index number of the subform that you are.

    Hope that helps

    Paul

  • Try to make a loop on a select statement in a procedure

    Ok
    I'm writing a procedure that will make an operation on every table in a select statement.
    Example: I want to add a column in each table that starts with "XX_" (XX_01, XX_BD, etc.)
    I have new procedures.
    I guess I have to use a cursor that is defined as:
    cursor xbtable is select * from user_tables where table_name like 'XX_%';
    begin
    open xbtables;
    loop
    Then what?
    How to make this work.
    Also, I have to use substr() on xbtable to extract parts of the name of the table...

    Can anyone help?

    THX

    I'm sorry, I made a mistake

    cursor xbtable is select * from user_tables where table_name like 'XX_ % ';
    String VARCHAR2 (200);
    Start
    for everything in the loop of xbtable
    string: = 'ALTER TABLE ' | Everything.table_name | "ADD column_name column-definition."

    immediately run a string;

    end loop;

    end;

  • How to inform a field in a display of field ('State' available in French)

    Hello

    I would like to inform a field based on another field screen, in a State.

    How should I do, because it's not like in a panel where this 'manipulation' is simple #en adding the prefix "Pxx_", where xx is the number of the page.

    Thank you for your help.

    Olivier

    Hi, I'm not really understand the question...

    You ask how to copy an object to another session state?

    English version of the 'State' = 'State' in English, according to http://babelfish.yahoo.com/translate_txt

    This can be done
    : P1_ITEM1: =: P1_ITEM2

    Sorry if I misunderstood your question...

    Gus...

  • my Apple Watch doesn't let me take or make calls. Help please

    my Apple Watch let me make a call and then wouldn't take or make calls more. To be more precise I can't audio here of the other person.

    Hi Hannah

    It can help to cancel your iPhone in a Bluetooth headset pairing, if a currently associated with it.

    Otherwise, it can help to restart your iPhone and your watch. Turn on both devices off the power together first, and then restart your iPhone before restarting your watch:

    -To switch off your watch: press and hold the button side until you see the cursor off the power; slide it to turn off;

    -To switch on: press and hold the side button until you see the Apple logo.

  • That makes the option the Minimum processor state in the box options advanced a power Plan?

    Original title: the Minimum processor state

    What does the 'State of the Minimum processor' option in the Advanced Options of a power Plan area? If I put it at 50%, this means that Windows will feed the processor of the unnecessary calculations just to keep 50% of its capacity? If so, why would it be of any use? If this isn't the case, then what is its role?

    Thanks for any clarification,

    Rifdhan

    Hi Rifdhan,

    The main reason you would set your option of the processor State Minimum to superior to the minimum (e.g. 50%) is if you run CPU intensive programs very and they would not work well at lower States of CPU.
    Processors do not require a constant stream of information to operate at a certain speed. For example, if you have a 2.0 ghz processor and you set the State of minimum CPU at 50%, the lowest ever, it will fall to East 1.0 ghz, even at idle.
    With your minimum fixed at 50% and maximum set to 100%, the real speed it works rest between these two values and the current amount of life battery will be factor in how quickly he chooses to run an average of 75%.
    If you set your minimum to 5% and up to 100%, it will go down very low to preserve the life of the battery.
    Hope this helps to understand how it works and I hope someone else can help to further clarify.
  • Make a selectable box both field

    Hey everybody

    I have three checkboxfields in my code and I just want to know how to do a selectable checkboxField at once.

    Please help me...

    Thank you

    found a sollution...

    A group of Radio buttons allow only one field to be selected at the same time...

  • Help list field

    [Hello everyone please I need help on the field of list]

    Here is my case:

    I want to show 10 records in a list and pressing other next 10 remaining records, I've created an example of code that shows me the first 5 records, but the next button I don't know what logic I have to apply it please help me

    package lists;
    
    import java.util.Vector;
    
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.ListField;
    import net.rim.device.api.ui.component.ListFieldCallback;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class MyLists extends MainScreen implements ListFieldCallback,FieldChangeListener{
        private ListField listField = null;
        private ButtonField btn=null;
        private Vector vData = null;
        public MyLists()
        {
    
            vData = new Vector();
            vData.addElement("A1");
            vData.addElement("A2");
            vData.addElement("A3");
            vData.addElement("A4");
            vData.addElement("A5");
            listField = new ListField(vData.size(),ListField.FIELD_HCENTER);
            listField.setCallback(this);
            listField.setChangeListener(this);
            btn=new ButtonField("Next", ButtonField.CONSUME_CLICK);
            btn.setChangeListener(this);
            //add(editField);
            add(listField);
            add(btn);
    
    }
    public Object get(ListField listField, int index){
                return vData.elementAt(index);
             }
    public int getPreferredWidth(ListField listField){
                    return Display.getWidth();
                }
    
    public int indexOfList(ListField listField, String prefix, int start){
                    return vData.indexOf(prefix, start);
                }
    
    public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width){
        String theString = (String)get(listField, index);
        graphics.drawText(theString, 0, y, 0, width);
                }
    
    public void fieldChanged(Field field, int context) {
                    if(field==btn)
                    {
                    What to do HERE PLEASE HELP ME
                    }
                }
    }
    

    remove items from the vector, add new items, invalidate

  • How to make a time by choosing field

    As well as creating a calendar, like this: HH: mm hh and mm can be set individually. I tried putting two NumericChoiceField in a HorizontalFieldManager, but failed. It seems that NumericChoiceField is too long.

    We cannot dissociate the Date field. But you can set HH MM Format in the DateField himself.

    DateField always returns the value of type long.

    Code below will help you.

    private DateField DF;

    DT = new SimpleDateFormat("hh:mm");

    DF = new DateField ("time:", System.currentTimeMillis (), dt, FOCUSABLE | "") DateField.LEFT | FURTHER TO THE LEFT);

    Add (DF);

Maybe you are looking for