Check a specific box based on a variable

First of all, I am using boxes as a radiobutton in this example.

I have a series of boxes to check all named "Finish1" when I select a specific checkbox in the "Finsh1" game, I want that he focus on the value of the exports of another group of checkboxes named "Color1" and hide the other specific. I have tried below I am sure is a mess and it does not work, but it was my best idea.

Thank you very much for your help!

var vc = this.getField("Color1").value;

if(vc == 3 || vc == 5 || vc == 8 || vc == 12 || vc == 13 || vc == 14  || vc == 18 || vc == 19 || vc == 20) {
       vc.display = display.hidden ;
}
else if(vc == 3 || vc == 5 || vc == 8 || vc == 12 || vc == 13 || vc == 14  || vc == 18 || vc == 19 || vc == 20) {
       vc.display = display.visible ;
}

What I thought, was when a finish has been selected, it would show all the checkboxes "Color1", except for those that were not available in this finish. Thus, when a finish is selected, the specific colors would be not visible.

It is not possible to hide specific boxes that are all named the same. The only way to get this working is to rename them and hide or show you want, then redefine the box, assuming you want to react like a radiobutton.

Thanks again try67 for all your efforts! A valuable asset to the forum!

Tags: Acrobat

Similar Questions

  • IOM - e-mail notification to a specific user, based on a dynamic State

    Hello, after creating the account in a particular target resource I need to send an email to a specific user based on the location of the user (for example area admin).

    In the notification of tasks tab, I see only "assignee", "Applicant", "User", "User Manager"? How can I reach the requirement specified above?

    Before asking this question, I tried to search the Forum of all previous posts related to it. But I could not find. Maybe I wasn't with the right keywords.

    Any help is appreciated. Thanks in advance.

    You will need an adapter to send the email, then you can send to any user, you want a custom code. Create a new task and it trigger the response of completion code. You can use the following APIs:

    sendMail tcEmailNotificationUtil = new tcEmailNotificationUtil (ioDatabase);
    sendMail.setBody ("your body here Type or use a string variable");
    sendMail.setSubject ("Type your topic here or use a string variable");
    sendMail.setFromAddress ("[email protected]");
    sendMail.sendEmail ("[email protected]");

    Just fill the rooms above with the necessary information.

    -Kevin

  • I used him copy / paste to add several checkboxes on my form, but now in preview mode when I check the first box it automatically checks all the boxes.  How can I stop this from happening?

    I used him copy / paste to add several checkboxes on my form, but now in preview mode when I check the first box it automatically checks all the boxes.  How can I stop this from happening?

    For later use, it happened because your fields have the same field name, and fields with the same name automatically have the same value.

    So all you had to do was so each had a unique name and it would have worked, but using the command create several fields is preferable because it renames the fields for rename you them.

  • Automatically select the correct check box based on choices made in the previous section?

    With the help of LiveCycle to create a form that contains a table. This table has 3 columns with 15 boxes in each column.

    Here are these 15 rows 3 more boxes that have calculated values. In each row of the table one of the checkboxes can be active at a time.

    Based on the majority of choices in a column of some, the calculated corresponding checkbox must be verified. (If most of the choices are made in column 1, then the 1st calculated box must be marked, etc...)

    The sentence that I am writing the JavaScript code that selects the checkbox correctly calculated. Currently, I'm just trying to understand it with only 3 first lines and I can reproduce the template after.

    Table e.g.: ("BOLD" is calculated)

    CheckBox20CheckBox35CheckBox50
    CheckBox21CheckBox36CheckBox51
    CheckBox22CheckBox37CheckBox52
    [CheckBox66][CheckBox67]

    [CheckBox68]

    Here's the code I came up with that day, but it does not just anyone, although when I used it it worked just to 2 columns. (just added the part about the third column in the instructions 'or')

    (In the script for the calculation of box 66)

    //larger values than other columns
    if ((Row1.CheckBox20.rawValue == "") + (Row2.CheckBox21.rawValue == "") + (Row3.CheckBox22.rawValue == "") > (Row1.CheckBox35.rawValue == "") + (Row2.CheckBox36.rawValue == "") + (Row3.CheckBox37.rawValue == "") || (Row1.CheckBox50.rawValue == "") + (Row2.CheckBox51.rawValue == "") + (Row3.CheckBox52.rawValue == ""))
     {this.rawValue = "0";}
    
    //smaller values than other columns
    if ((Row1.CheckBox35.rawValue == "") + (Row2.CheckBox36.rawValue == "") + (Row3.CheckBox37.rawValue == "") || (Row1.CheckBox50.rawValue == "") + (Row2.CheckBox51.rawValue == "") + (Row3.CheckBox52.rawValue == "") > (Row1.CheckBox20.rawValue == "") + (Row2.CheckBox21.rawValue == "") + (Row3.CheckBox22.rawValue == ""))
     {this.rawValue = "1";}
    

    I'm new to JavaScript for all advice is appreciated.

    Looking at the conditions, it seems you are trying to say "If column 1 column 2 or column 3, then do something." JavaScript cannot read conditions like that. It's playback "if (column 1 column 2) GOLD (column 3), ' and he doesn't know what to do with this issue of column 3, except if it is 0 or 1.

    Here is an example of use of only two lines and three columns. The rawValues are 0 and 1 for each check box. I have it set so that if column 1 has several checkboxes, then Col1 gets checked. Similarly, the col2 or 3 boxes will be checked if their columns are the most populated. I don't get the opportunity to have several boxes marked if there are two columns that have the same number of boxes checked. (You can do this by just changing > to > = in the conditions.)

  • Return specific text based on a percentage in another text box

    Hi all

    OK, got a head scratcher, and I'm sure it's easy for any experienced writer. Just not so easy for someone just to get into it.

    I have a form that count percentage in the text box. Based on the percentage of return in this box, that I would like to return a permission level in an adjacent area. The table below gives you an idea on what I'm after.

    PercentageApproval level
    0-30%TEXT1
    31 50%TEXT2
    51 60%TEXT3
    61 80%TEXT4
    81 100%TEXT5

    Any help would be appreciated.

    Thanks in advance!

    Okay, so that the custom field approval level calculation script you can use something like this:

    var perc = this.getField("Perc1").value; // let's say the percentage field is called "Perc1"
    if (perc>=0 && perc<=0.3) event.value = "TEXT1";
    else if (perc>0.3 && perc<=0.5) event.value = "TEXT2";
    else if (perc>0.5 && perc<=0.6) event.value = "TEXT3";
    else if (perc>0.6 && perc<=0.8) event.value = "TEXT4";
    else if (perc>0.8 && perc<=1) event.value = "TEXT5";
    else event.value = "";
    
  • Check generate some Comp based on the drop-down list box and the selection list?

    I currently have a dropdown list with the three sizing options in it. Then I have two check boxes, one is ticked ideally would create the model to its normal size composition and if other is checked that it would reverse the widthxheight in the size of the composition. Then below that I have a "Generate" button, I want to be able to click and according to my selections, it creates the model.

    Looks like I need a kind of if then statement, but I'm having a hard time putting the two together. See below what I have so far.

    There may be missing parts, but I have it all working in a decibel pallate currently. I don't have functionality related to a button again.

    Any help would be appreciated!

    (also I don't know how to format the script spread here so apologies for that)

    ---------------------------

    palette controls

    templateGen.VerticalCheckbox = new Object();

    templateGen.HorizontalCheckbox = new Object();

    set the values for controls

    templateGen.comLookup = new Object();

    templateGen.compLookup = 'Template1 ';

    templateGen.compLookup = "Template2";

    templateGen.compLookup = "Template3."

    function templateGen_getHashValues (hash)

    { // {{{

    var ary = new Array();

    for (k hash) {}

    ARY.push (Hash [k]);

    }

    return area;

    } // }}}

    menu "composition".

    var panelGrp1 = templateGen.palette.add ('Panel', undefined, 'Templates Comp');

    compGrp1 = panelGrp1.add ('group', undefined, 'List templates');

    compGrp2 = panelGrp1.add ('group', undefined, 'Orientation');

    compGrp3 = panelGrp1.add ('group', undefined, 'Generate');

    templateGen.compList = compGrp1.add ('dropdownlist', LIST_DIMENSIONS, templateGen_getHashValues (bapple.compLookup));

    templateGen.compList.helpTip = "choose the type of desired here device model. All compositions are 60 fps. « ;

    templateGen.compList.selection = 'Template1 ';

    templateGen.compList.graphics.foregroundColor = darkColorBrush;

    templateGen.VerticalCheckbox = compGrp2.add ('checkbox', undefined, 'Portrait');

    templateGen.VerticalCheckbox .value = true;

    templateGen.HorizontalCheckbox = compGrp2.add ('checkbox', undefined, 'Horizontal');

    templateGen.HorizontalCheckbox .value = false;

    templateGen.generateBtn1 = compGrp3.add ('button', undefined, 'Generate');

    applyBtn.onClick =? ;

    When I work with drop-down menus, I always liked to tie the data they represent (like the width and height of the model in this case) directly to the elements.

    I run the code to really check, but it should work like this:

    -----------------

    Add models to your drop-down list and store the items in a table

    models var = [];

    models [0] = templateGen.compList.add('item','template1');

    models [1] = templateGen.compList.add('item','template2');

    models [2] = templateGen.compList.add('item','template3');

    set a width and height of each element

    models [0] .width = 1280;

    models [0] .height = 720;

    models [1] .width = 1024;

    models [1] .height = 768;

    models [2] .width = 1920;

    models [2] .height = 1080;

    Choose the item that should be selected by default

    models [0] .selected = true;

    applyBtn.onClick = function() {}

    read the width and height of the selected item

    var width = templateGen.compList.selection.width;

    var height = templateGen.compList.selection.height;

    {if (templateGen.VerticalCheckbox.value)}

    swap width and height

    var temp = width;

    width = height;

    height = temp;

    }

    now create your comp here with the given width and height

    }

  • Check boxes based on the table...

    I have an 'event' of the table, a "subject" of table and one table that links these two 'event_topics '. I have a form to create events and want to have all the available topics in the table of 'event' presented a list with checkboxes, to verify for each event, all the van when registering for any subject verified and relevant topics, a line is added in "event_topics" with the event_id and the topic_id.

    Is this possible? And if so, how do I start on this? I use Apex 3.2.

    Hello Tom,

    Yes, it is possible.

    First of all, you need a point of the box. The LOV for this element of the value to something like

    select topic_name, topic_id from topic order by topic_id
    

    To save the selection you need a process of pl/sql

    declare
      vPICKED apex_application_global.vc_arr2;
      vITEMS varchar2(1000);
      vCOUNT number;
    begin
    
      vITEMS := :YOUR_CHECKBOX_ITEM;
    
      --first delete all entries from event_topics that are not checked
      delete from event_topics
      where ':' || trim(to_char(topic_id)) || ':' not in (':' || vITEMS || ':')
      and event_id = :EVENT_ID;
    
      -- insert all new checked topics into event_topics
      vPICKED := apex_util.string_to_table(vITEMS, ':');
    
      for z IN 1..vPICKED.count
      loop
        select count(*) into vCOUNT from event_topics
        where event_id = :EVENT_ID
        and topic_id = vPICKED(z);
    
        if vCOUNT = 0 then
          insert into event_topics values (:EVENT_ID, vPICKED(z));
        end if;
      end loop;
    
    end;
    

    To extract the items all turned on during the loading of the page, you need to load on before the process of the header:

    declare
      vPICKED apex_application_global.vc_arr2;
    begin
    
      select to_char(topicl_id)
      bulk collect into vPICKED
      from event_topics
      where event_id = :EVENT_ID
      order by topic_id;
    
      :YOUR_CHECKBOX_ITEM := apex_util.table_to_string(vPICKED, ':');
    
    end;
    

    Hope this helps,
    Dirk

  • Check the boxes based on the value in a text field

    Hello.

    I'm building a pdf form in Acrobat Professional X. I want to add JavaScript to two checkboxs to achieve the following objectives:

    If the value of a text field (TLigne) is equal to 61, 64, 66 or 67, the first box (PlanACheck) has the value of the object of an audit.  If the value of a text field (TLigne) is equal to 60, 62 or 63, the second box (PlanBCheck) has the value of the object of an audit.

    I have no other than copy and paste Javascript experience, so I'm not sure I use the right language to research. If anyone can provide guidance, I would be very happy.

    Thank you very much!

    Usually this kind of thing will run the custom calculation of the target field script, but the boxes is not a calculation script, so we'll use the text for field Validation script do, with this code:

    this.getField("PlanACheck").checkThisBox (0, (event.value == "61" | event.value == "64" | event.value == '66' | event.value == "67"));

    this.getField("PlanBCheck").checkThisBox (0, (event.value == "60" | event.value == "62" | event.value == "63"));

  • Conditional display in the text box based on the calculated value

    Hello

    I have radio buttons that each have a numerical value. For example = 1 A = 2 C = 0. In the example below, the total is equal to 5.
    examplescreen01.gif

    The sum is displayed at the bottom of the document and is passed to another text box:

    examplescreen02.gif

    Instead of '5' displayed in the text box on the right, it should display a "Control" Word like this:
    examplescreen03.gif

    The displayed word is based on the totals through this range:

    1-2 = 'absorbing '.

    3-4 = 'practitioner '.

    5 to 6 = "control".

    The script I used to pass the value from the left to the right text box in the chart above is:

    name of the field to text box;

    var cTextBox = 'Cabinet Talent strategy knowledge - total';

    get the value of the field with the name in cTextBox;

    var sTextBox = this.getField ("cTextBox") .value;

    Set the value of this field;

    Event.Value = sTextBox;

    That I need to add to this script to show one of the words, such as "control" above?

    I am a complete novice to scripting. I found the above script online and somehow got it to work.

    I thank very much for any help or pointers, you can provide.

    Best regards

    Chris

    Sorry, there were some errors in the code that I provided above. Try this:

    If (sTextBox > = 1 & sTextBox)<= 2)="">

    Event.Value = "absorbing";

    } ElseIf (sTextBox > = 3 & sTextBox)<= 4)="">

    Event.Value = "practitioner";

    } ElseIf (sTextBox > = 5 & sTextBox)<= 6)="">

    Event.Value = "master";

    } else {}

    Event.Value = "";

    }

    If it still does not respond, you can send me the file at [email protected] and I'll check...

  • A question with the option "check all the boxes."

    Is it possible to use advanced actions to create a custom where question the following may occur:

    1. users can "see all that apply" to a matter of choice mulitple (3 responses)
    2. have a comment box if all selected users boxes - which is the right answer
    3. Another boc feedback if users selected only 1 or 2 boxes.

    I played around with the widget CheckBoxesEnhancded however, the answers to my questions are long and the formatting looks terrible.

    Would propose the widget checkboxes, but apparently you don't like it.

    Another way is to use images of a checkbox control and cover it with a box of click that can trigger a tip action. You will need to show the check mark by this advanced action, assign a value to a variable that is associated with it and the adapted text of legend. This will be a conditional action, since you have to check each time if 1, 2 or marked all of the boxes were correct. Or if you want a submit button, which seems logical, because it allows the user to decide when to enter his answer? In this case the actions triggered by the boxes to click on checkboxes can be standard stock, showing the check mark, assign the value to the corresponding variable, disabling, or hide the click box and rewind the playback head (Assign rdcmndGotoFrame with rdinfoCurrentFrame) so that it will not continue on the timeline. If you want to allow the user to disable the checkbox, it should be a conditional action because in this case, you will hide the check mark yet once if she was already there (variable value) and do not need to disable the click box. The point of suspension of the Submit button should be later than ellipsis boxes to click. The Send button will trigger an advanced condtional verifies that the text caption should be made visible.

    Lilybiri

  • I am unable to check save password box. Yet once downloaded and got the same results.

    Check box is clear and does not respond when I click on it. I am running xp pro

    To confirm, are you referring to the box in the 'Security' of the Firefox options panel?

  • Posture of the ISE - check a specific MS KB

    Hello

    I ISE 1.2.1 works well with configured posture and now I´d like to check if a particular KB Microsoft is installed.

    How can I do this with the Posture of the ISE? Someone did he do already have?

    Kind regards.

    The Ko probably creates a specific registry key or add some file, you can check that. Most of the construction in Cisco KB checks, use the registry key to see if Ko is installed.

    Ex. KB2758694

    SOFTWARE\Microsoft\Updates\MSXML4SP3\Q2758694\

  • How to pre-fill boxes based on a selection of choice list?

    So we have a 'primary area of interest", which is a priority for the customer is most interested. However, we also have a list of ALL our lower technologies on the form.

    How can we make it if they make a selection of the P.A.of interest prepopulate (or check) it maps to one of the technologies listed in the form of box?

    Main area of interest: [drop down list]-> Orange

    Technologies of interest-

    [Apples]

    Pears]

    [X] Oranges

    Berries]

    While allowing them to select also other choices:

    [X] apples

    Pears]

    [X] Oranges

    Berries]

    Hey Jorge,.

    That's the basic idea, I just copy/paste/written really fast, in order to better check.

    When choosing the multiple selection and myCheckbox is the theckbox...

    {$(document) .ready (function ()}

    $(«select») .change (function () {}

    $(«sélectionnez l'option: sélectionnés») {.each (function ()}

    / * do something here to make the logic of the box and check the box use this: * /.

    $('.myCheckbox').prop ("checked", true);

    });})});

    Reference

    (1) : checkbox selector | jQuery API Documentation

    (2) . change() | jQuery API Documentation<--- check="" the="" demo="" at="" the="" bottom="">

    Mapping so if they click on option A, box 1 & 2 will be checked, if they click on option B, case 1 & 3 get checked... and so on. The mapping is manual.

    You must also consider unchecking the boxes, being also discussed in REF 1.

  • Check all the boxes.  Is it possible to make my form do that with checkboxes?

    I do an option for communicable diseases by blood possible.  It should be a required field, so we know that they are not to be missed.  I have currently defined it as a check boxes.  I know that I could do as a drop-down list and people could maintain the shift/Ctrl key and select the necessary options, but not everyone gets that.  So, I would be checkboxes... quick and simple, right?
    This

    So, how do I make something like this work.

    You have following situations? (The customer privacy is protected according to the HIPAA laws):

    [___] No [_] Hép hepatitis B C [_] [_] HIV

    [___] Other - Specify ____________________________________________________

    Looks like the InDesign Panel

    indesign-panel.jpg

    I saw nothing in there all that allows multiple choices. And when I went to change the form in Acrobat, I saw nothing about multiple choice questions.

    Any help is greatly appreciated.

    Kim

    For example, it may be something like this:

    if (this.getField("CheckBox1").value=="Off" && this.getField("CheckBox2").value=="Off" && this.getField("CheckBox3").value=="Off") {
        app.alert("You must first select one of the check-boxes before submitting the file.");
    } else {
        this.mailDoc({cTo: "[email protected]"});
    }
    
  • I have 10 windows and items 14. The game version saves only the edited phito. Have checked the appropriate boxes.

    I have 10 windows and elements 1. The ENP only the retouched version. I checked the boxes to include and save.

    williamp74752947 wrote:

    Thank you for your response. My problem is when I try to back up the original

    and edited the photo in the Organizer, it saves only the edited photo. I have

    checked the boxes to save them both. My 12 items records both in the Organizer.

    ??? When you save as a set of version, the original is just closed without change; This is the main reason, keeping the original unchanged. This is the version that is recorded. What boxes did you check? Maybe after a screenshot.

    There is no difference between 12 and 14 versions, except that the 14 shows default version of the 'adaptive grid' discovers instead of the "detailed" view You can switch between the two views with the shortcut Ctrl + D. Only the former 'detail' lets see show you both the original and the version.

Maybe you are looking for