Limiting Check Boxes by User

How can I limit the number of check boxes a user can select?  I created the form in Acrobat XI, there are 20 check boxes and are named "chkBox0 thru chkBox20."

Here's a sample form that demonstrates one way to do this: https://workspaces.acrobat.com/?d=j-aUbc3YTz1uu8Jx0LvzHg
Each check box calls the same function that's defined in a document-level JavaScript. You'll have to study it a bit to see how it works.
Here's the document-level function:
function limitCheckNumber(prefix, lower, upper, max) {
    // Initialize the selected check box count
    var count = 0;
    // Loop through the check boxes to see if the limit has been exceeded
    for (var i = lower; i < upper + 1; i += 1) {
        // Increment the counter if the current check box is selected
        if (getField(prefix + "." + i).value !== "Off") count += 1;
        // If the count exceeds the limit, deselect the check box that was just selected
        // and alert the user
        if (count > max) {
            event.target.value = "Off";
            app.alert("A maximum of " + max + " check boxes can be selected", 3);
            break;
And here is the Mouse Up script for each check box:
limitCheckNumber("check", 0, 9, 4);
The check boxes are named: check.0, check.1,...,check.9, and it's limited to 4 check boxes max selected at one time.

Similar Messages

  • Programatically enable-disable check box"play user interface sound effects"

    Hello All,
    I have been Working on something where i need to disable the "play user interface sound effects" check box ( Under System preferences under sound panel ) for few seconds and then enable the same programically without any user interface appearing on the screen. I know something related using the Applescript however there is a user interface appearing there which doesn't serve the purpose please help with some solution.If you could provide the exact location of the plist file which holds this information then that could help as well.

    Hi !
    I too have been working with the sounds ( Which i think is relates to @mit's query ) in an application and the problem is that when ever that application moves something to trash there is a sound which comes the sound of "throwing things in the trash". This is very annoying and i want to do something so that I can suppress that sound atleast for the time this application is on. Now is there some way where I can do this Programically . It would even be fine if I could turn off the user interface sounds completely for sometime and then bring them back on.
    Thanks In Advance !
    Looking Forward To Some response soon !
    iMAC G4   Mac OS X (10.4)   Power PC 256 MB RAM

  • How to Auto-populate TextField in Acrobat x with a value determined by user check box selection?

    I have a group of 3 Check Boxes for user to select their Work Shift:  The check boxes are set up to be mutually exclusive (same name: "EMP_Shift", different Export Values: Day, Evening, Night).
    Form Field properties name:      EMP_Shift (for all 3 check boxes)
    Acrobat edit panel field names:  EMP_Shift#0, EMPShift#1, EMPShift#2
    Export Values:                         Day, Evening, Night (chose these only because they are descriptive)
    I need to Auto-populate a Text Field named EMP_WorkShift with "Day" if EMP_Shift#0 is selected, "Evening" if EMPShift#1 is selected, or "Night" if EMPShift#2 is selected.
    Is there a script I can use to accomplish this in Acrobat Pro X.

    The simplest is to set up the text field to be calculated using the following custom Calculate script:
    // Get the value of the check box
    var v = getField("EMP_Shift").value;
    // Set this field value
    event.value = v !== "Off" ? v : "";
    You'd normally set the text field to be read-only, but if you want the user to be able to edit the text field, you can instead use the following script in the Mouse Up event of each check box:
    // Get the value of the check box
    var v = event.target.value;
    // Set the value of the text field
    getField("EMP_Workshift").value = v !== "Off" ? v : "";

  • Need code for Dynamic check box creation in struts

    dynamic checkbox should be created with details of data stored in database(with check mark for already selected check box).
    once user make any change to that page and click submit the result ahould be saved in database..
    can anybody explain me how to proceed this.
    If any sample source code you have plz do sent me..

    consider these are the details in database
    1. apple checked
    2. orange
    3. mango
    4. grapes checked
    consider a jsp page which should display list of fruits in the datsbase,
    the jsp page should retrieve these data and diaplay with check box.
    These should be generated dynamically.
    Assume the jsp page has option for user to enter some other fruit name which should be updated into database of fruits and that should be displayed with the jsp page during next visit.(i.e) number of fruits in the database is not constant.

  • ADF Tree with Boolean Check Box: How to find selected items

    Hi Experts,
    ADF: 11.1.1.5.0
    WLS: 10.3.6
    I am using an ADF Tree which contains elements at two levels (say Departments and Employees). My requirement is to give provision for user to select Departments and Employees using the check boxes. User should be able to select what ever Departments he/she likes and what ever employees he/she likes. There should not be a provision to select Employee with out selecting the corresponding Department (root node in the tree).
    I am facing the below issues while trying to implement this use case:
    1. Always, only the first master record will be expanded by default (I am using "Display Row" property value as "default" and "ExpandAllEnabled" as "true"). My need is to expand all the master records by default. So that user need not explicitly expand each master record node and then select the associated child records.
    2. Currently, I am using value change listener associated to af:selectBooleanCheckBox to identify the Departments and Employee records that have been selected. Since not all departments (masters) are expanded by default, if user selects the check box of department (master) and then expands the department node, automatically all the employees of that department are selected. But, this event is not triggering the value change listener for the employee records. Because of this, after a department node is selected and then expanded, all the child elements' check boxes are selected but the events are not generated. Hence, I am not able to capture the selection of employee records.
    To summarize,
    1. Please let me know how to expand all master nodes in af:Tree by default.
    2. Please let me know the best approach to identify the selected items (both master and detail items) in the af:Tree component using af:selectBooleanCheckBox.
    Thanks in advance,
    Rathnam

    Hi,
                Can you please elaborate the solution? I have a similar problem in
    https://forums.oracle.com/thread/2579664

  • Dynamic selection of check boxes on selecting a check box

    Hi Friends,
    I have to select the check boxes which are herarchically lower to a top check box,dynamically.
    Eg:
    Checkbox1
       checkbox2
       checkbox3
    so if i select check box 1, on the screen both checkbox2 and checkbox3 have to be selected.
    I did like below.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF P_ALL = 'X'.
          P_VAT = 'X'.
          P_NAME = 'X'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    but values are checked but on screen its not checked.
    how to handle this.
    Regards,
    Simha

    hi
    do like this
    paramenter: check_1  type c as check box at user-command ,
    check_2 type c as checkbox default X,
    check_3 type c as checkbox default X.
    At selection Sreen output
    if check_1 = 'X'.
    loop at screen .
    if screen-name = 'check_2'.
    screen-invisible  = '0'.
    endif.
    endloop.
    loop at screen .
    if screen-name = 'check_3'.
    screen-invisible  = '0'.
    endif.
    endloop.
    else
    loop at screen .
    if screen-name = 'check_2'.
    screen-invisible  = '1''.
    endif.
    endloop.
    loop at screen .
    if screen-name = 'check_3'.
    screen-invisible  = '1'.
    endif.
    endloop.
    endif.
    this solve ur problem
    Cheers
    Snehi

  • Is there a way to automatically add a page to my current form when the user marks the check box?

    I have an existing expense report form that I created using Adobe Pro's Form Tools. The user enters all the appropriate information (ie, vendor, amount, business justification, etc.) and then it calculates all the expenses at the bottom.
    I have added a box next to each line item to be checked by the user in the case that they have an expense with a missing receipt.
    Is there a way to have a pre-existing missing receipt form, be added at the end of the expense report, each time the user marks one of these missing receipt check boxes?
    If so, is there a way to have all the expense line item data automatically fill in the information on the added missing receipt form?
    I am using Adobe Pro's Form tool rather than Livecycle because it is compatible with my IPAD.
    Thanks,

    One word: Templates
    For more information, see: page: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_Templates.80.1.html
    Unfortunately, templates don't work with Reader either, unless the document is Reader-enabled with LiveCycle Reader Extensions.

  • ME21N-Deliver completed check box in delivey tab to be given user authorzn

    In ME21N User A creates the Po for a Quantity 100 Nos & then he makes a MIGO for the qty 60 Nos:He comes back to ME22N in *DELIVERY TAB where in there will be a check box as DELIVERY COMPLETED :He will ensure to tick the same & save.
    So Other User B enters the same PO in ME22N & Removes the ticked  check box as DELIVERY COMPLETED & saves it.
    Please suggest me the solution based on the same.

    Hi Murali,
    This issue is because of the user transaction authorization, user A & B. And it can be done by sap security authorization by basis for that perticular transaction, then system can not allow to change or modify any data pertaining to the PO. So, please contact sap basis consultant, will be doing that, so that user can not change the data manually. And
    Basically when we talk about the the Delivery Completion Indicator, it should not be set manually, but it will be flagged by system automatically soon after the goods are received fully.
    For a good business practise: this
    "Deliv. Compl." -> indicator in Delivery tab of Item details is not to be set by user manually, because system will be updating that with flagged automatically soon after the full goods are received.
    Hope it clarifies you,
    Regards,
    Srin

  • Binding a Check Box with a User Defined Field

    Hi everyone,
    i v created a user defined field (U_CheckPro)in the system table "OITM" with two values: Y for Yes and N for No. In relation to that i v also created a check box on the form "150" and would like to know how can i bind my checkbox with  my user defined field properly.
    The user would be than able to enable or disable the check box for each item (article). The user setting schould be than be active and valid in sbo-business logic, each time an item is selected. (for example in case of sales order ID 133, "OINV").
    Any helfpul hints? Samples would be welcome as well.
    Thanks and regards
    Alban

    > First of all you should remove the valid values
    > because checkboxes does not work with valid values...
    > Just give a default value.
    Hi Rasmus,
    thank you very much for your helpful hint. I guess my problem is solved by that - nevertheless here is my complete code sequence once again in case of possible errors.
    I would appreciate any additional suggestion for improvement of the same.
    Thanks and regards
    Alban
    >>>
    Private Sub AddItem()
            ' Test UserSource
            oForm.DataSources.UserDataSources.Add("U_CheckPro", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oItem = oForm.Items.Item("122")
            ' Adding a Static Text item
            oNewItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            oNewItem.Left = oItem.Left + 20
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + 12
            oNewItem.Height = 25
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.LinkTo = "CheckBox1"
            oStaticText = oNewItem.Specific
            oStaticText.Caption = "Test_Caption"
            ' Adding a Check Box item
            oNewItem = oForm.Items.Add("CheckBox1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 20
            oNewItem.Top = oItem.Top + 15
            oNewItem.Height = 19
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.DisplayDesc = False
            oCheckBox = oNewItem.Specific
            'binding check box to source
            oCheckBox.DataBind.SetBound(True, "OITM", "U_CheckPro")
        End Sub
    >>>

  • How do can I have the form fill in a check box if the user has entered text in a textbox?

    I have a form that is submitting an xml data file that is picked up by MS Word and used to populate a document. However, there's a 'Miscellaneous' field where the user can type in addtional information that would not drop easily into the Word document (exceptions, items not on the drop down lists, etc.). I'd like to test to see if that Miscellaneous field has infomation in it and if it does, to set a invisible checkbox to "1" so that I can insert a text message in the Word document that there's additional information in the .pdf form that will have to be addressed manually in the Word document.
    I've tried
    if(Misc.rawValue !== "")
    otherinfo.rawValue = 1;
    but while it doesn't generate a Javascript error, it doesn't set the value either, and I haven't found any function that checks for whether a field is empty. I'm sure there's got to be a way to do this, but I'm stumped. Any help greatly appreciated!
    Bill

    It appears you are using LiveCycle Designer, so you will have to use the syntax of FormCalc or LiveCycle Designer JavaScript.
    For FormCalc:
    if(HasValue(Misc)) then
    otherinfo = 1
    else
    otherinfo = 0
    endif
    For JavaScript
    if(HasValue(Misc.rawValue))
    otherinfo.rawValue = 1;
    else
    otherinfo.rawValue = 0;
    I added code to clear the check box if the user clears the field.

  • Allowing user to click check boxes in any order

    Hi,
    I'm using Captivate 5.5 to create a training session with our software. On a particular page, our trainer wants me to instruct the user to click every check box on a page. Since there are 10 check boxes, I would like to let the user click all the check boxes in any order, as opposed to clicking them in the same order that I did using the normal training recording.
    I've been trying to insert click boxes and assign variables, but then I run into the problem of not being able to show the checkmark when the check box is clicked.
    Has anyone run into this problem or tried to created a page where the user can click multiple object in no particular order?
    Thanks!

    Hello,
    This is perfectly possible with the checkboxes widget, and will be a lot less work than messing with images and click boxes. The big advantage of the checkboxes widget is that it is static, so you do not need to worry about rewinding the playhead which would be the case if you are working with interactive objects. However if you want to offer a 'reset' to the user, or perhaps to return to the slide with the widget, I warmly recommend to download the free enhanced checkboxes widget created by Jim Leichliter, because it allows you to control the variables associated with the widget.
    I will not explain extensively how to use it, bit in a hurry because I have to teach in a couple of minutes. But here are some links: first a link to Jim's widget, than to a blog post where I explain the use of the Default Checkboxes widget, and third the explanation of the enhanced version.
    Checkboxes Enhanced
    Widgets and Custom Questions - part 1
    Extended widgets ...
    Just one last warning: I did not check the maximum checkboxes supported by the widget (you need 10), if necessary however you can insert the widget twice. However never duplicate a widget, nor have them in the same space on the stage.
    Lilybiri

  • How to make a check box appear to the user when he does a specific action

    hi all
    i have created a check box and i want if the user does not do a specific action the check box appears ?

    so sorry i ment a frame with an error message
    remember my last program about randomization
    i want if the user did not enter the first name
    a message appear to warn
    and if he did not enter the second name
    a message appear to warn
    here i created a created a second frame to appear as
    awarning message
    and the action to allow the error frame to appear
    else
    c2.setVisible();
    but the compiler didnot recognized c2
    is that not legal to create two objects from
    container c2=getcontentpane();
    i want to understand this problem
    and making my code right
    and making my code right
    Code:
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import java.awt.event.*;
    class MyMatching extends JFrame
         final JTextField txt1=new JTextField("Name1",10);
         JLabel lbl3=new JLabel("Love");
         final JTextField txt2=new JTextField("Name2",10);
         JButton btn=new JButton("Result");
         JTextField txt3=new JTextField("%",5);
         JTextArea ta=new JTextArea(10,40);
         ImageIcon img=new ImageIcon("D:\\Mastering Java\\Java Projects\\Icons\\alert_lrg.gif ");
         JLabel lbl=new      JLabel(" Do You Love Computer Science?",img,JLabel.LEFT);
         JPanel pnl1=new JPanel();
         JPanel pnl2=new JPanel();
    JPanel pnl3=new JPanel();
         MyInner inner;
         MyMatching()
              setupGUI();
         private void setupGUI()
              setSize(500,300);
              setTitle("Love Matching v1");
              Container c=getContentPane();
         Container c2=getContentPane();
              c.setLayout(new BorderLayout());
              pnl3.setLayout(new BorderLayout());
              pnl1.setLayout(new FlowLayout());
    pnl1.add(txt1);
    pnl1.add(lbl3);
    pnl1.add(txt2);
    pnl1.add(btn);
    pnl1.add(txt3);
    pnl2.add(ta);
    c.add("North",pnl1);
    c.add("Center",pnl2);
    lbl.setIcon(img);
         pnl3.add("Center",lbl);
         c2.add(pnl3);
    setVisible(true);
    inner=new MyInner ();     
    btn.addActionListener( inner);
    // txt1.addActionListener( inner);
    // txt2.addActionListener( inner);
    class MyInner implements ActionListener
    public void actionPerformed(ActionEvent e)
    if(!txt1.getText().equals("Name1") && !txt2.getText().equals("Name2"))
         if (e.getActionCommand().equals("Result"))
    //First process
    int random= ((int)(50*Math.random()))+50;
    txt3.setText(random+"%");
    //second process
    String msg[ ]={"Love Can Touch Us One Time And Last For The Life Time\nYou Are A True Lovers.","Your Feelings Are Different \nYou Should Forget it."
    ,"Love Is A Passion\nYou Must Be More Romantic.","You Are An Angel\n But Your Lover Is A Liar."
    ,"You Must Think Deeply Before That Choice\nLove Is Not An Entertainment.","Do Not Lie To Your Hart\nYou Still Love Your First Lover."
    ,"You Cannot Love Again\nYour First Lover is So Lovely And Cannot Be Forotten."};
    ta.setText( msg[((int)( msg.length*Math.random()))] );
    /* breaking up the code
    double random = Math.random();
    int index = (int) (msg.length*random);
    String message = msg[index];
    ta.setText(message);*/
    ta.setForeground(Color.RED);
    else
    c2.setVisible();
         public static void main(String[]args)
              MyMatching mtch=new MyMatching();
    }

  • Popup screen with two check box and a text area for the user to enter value

    hi,
    i have a requirement when a button is clicked a popup screen should appear with two check box and a text box where the user can enter a value.
    is there any function module which has that functionality

    Hello,
    You can create a new screen and select the screen type as <b>model dialog box</b>.This will give you a<b> pop-up screen</b> and you can call this model dialog box screen in the PAI of the screen where the button is present.(At user-command).
    <b>case ok_code.
    when 'BUTTON'.
    call screen 200 starting at 10 10.</b>
    You can design the PBO of this pop-up screen as per your needs.
    Regards,
    Beejal
    **Reward if this helps.

  • Making a Text Field Required if User Checks box

    Hi,
    I am currently using Adobe Designer 7.0, and am trying to make a text field required if a user clicks on a check box above the text field.
    I have the following code for the check box (on Change) but it doesn't appear to be working!! Any suggestions??
    Thanks!
    if (this.rawValue == 1 ){
    TextField7.value = "User Entered - Required";
    else {
    TextField7.value = "User Entered - Optional";

    Hi Krisitan,
    you are trying to change the value of the field instead of it's accessability.
    Try this:
    if (this.rawValue == 1 ){
    TextField7.mandatory = "error";
    else {
    TextField7.mandatory = "disabled";

  • Update order user status based on a custom check box value in web ui

    Hi Experts,
    I have a requirement to Update the  user status based on a custom check box value in web ui.
    This is needed at the followup for a SR, the component is BT116H_SRVO, Details View.
    I created a value node with 4 checkboxes, based on the check box value, the corresponding user status
    need to be updated.
    How can I reach to the order save functionality of SAP in EH_ONSAVE method, so that syatem can capture my check box value, along with other screen fields, and append the status parameter in Order maintain?
    or do I have to call order maintain in even handler for checkbox, which will affect performance .....
    Pls help.
    Regards,
    Lakshmi

    Hi,
    In your event handler you can use bol entity corresponding to status BTStatusH and change the user status.
    Best regards,
    Caíque Escaler

Maybe you are looking for

  • 10.5.2 wake/sleep and closed-lid problems

    As of 10.5.2 my MBP no longer works correctly in closed lid mode using a hardware setup that previously worked flawlessly. After plugging in power and video, plugging in the USB keyboard seems to wake the system, but no video. I then must open the li

  • Carry Forward balance

    How to get a carryforward balance for a particular fiscal year? Is there any std FM or BAPI? How to make out if the balance is carried forward for a particular fiscal year?

  • Comic and Graphics Novel filters, Elements 11 editor crashes

    Hi, I just downloaded Elements 11 Editor for mac OSX 10.9, and when I try to use any of the new filters (comic, Graphic Novel, etc), it crashes. What do I do?

  • Svctimesag

    Hi Team, In one of our Production server a process called "svctimesag.exe" is consuming high CPU. This issue was detected a day before. For immediate resolution we killed the process but it didn't help so we have to reboot our server. In the last 24

  • How about hatchlings leaving the nest?

    This time of the year can be the best for getting up close photos of birds.  The babies are flying the coop so to speak and are not as wary as the adults.  Permitting you to get closer.  And all bird photographers know closer is better than any tele.