Send one of the 5 checkbox values to a text field

I try to send the value of one of the six checkboxes checked to a text field and just cannot get by.  Can someone help me.

Here is the script I tried to work with.  I know it's fake because it does not work.

var architect = getField ("Chkbx Arch")
var engineer = getField ("Eng Chkbx")
var landscape = getField ("land ChkBx")
var inner = getField ("Int Chkbx")
var other = getField ("another Chkbx")

If (architect == 'Architect') {}
Event.Value = "Architect";
}
ElseIf (engineer == 'Engineer') {}
Event.Value = "Engineer";
}
ElseIf (landscape == "Landscape Arch.") {}
Event.Value = "Landscape Architect";
}
ElseIf (inside == 'Interior Designer') {}
Event.Value = "Interior Designer";
}
Else if (other == 'Other Designer') {}
Event.Value = 'Other Designer';
}

Have you watched the JavaScrpt console to see if you get any errors reported in your script?

JavaScript is a language "object" oriented. You must identify an object, and then access properties or methods of the object. 'event' is an object and it has a property of 'value '. If the code 'event.value = 'string';' sets the value of the current event to the string "string". The "' it's the current PDF document. "getField" is a method of that object that gets a field named object. Once you have this object, you must use the 'value' property to get the value of the named field

.

If you want the boxes to be exclusionairy, one authorized selection, you should give them all the same name and assign different values for export.

function() {return A.apply (null, [this] .concat ($A (arguments)))}

var architect = this.getField("Arch_Chkbx").value;
var engineer = this.getField("Eng_Chkbx").value;
Landscape of var = this.getField("Land_ChkBx").value;
internal var = this.getField("Int_Chkbx").value;
var other = this.getField("Other_Chkbx").value;

else event.value = ";

If (architect == 'Architect') {}
Event.Value = "architect."
}
ElseIf (engineer == 'Engineer') {}
Event.Value = "engineer."
}
ElseIf (landscape == "Landscape Arch.") {}
Event.Value = "landscape architect";
}
ElseIf (inside == 'Interior Designer') {}
Event.Value = "Interior Designer."
}
Else if (other == "Other Designer") {}
Event.Value = 'Other Designer';

Tags: Acrobat

Similar Questions

  • How can we make invisible static value in a text field to the OPA

    Hi all

    I have invisible static value in a text field in the OPA.

    For ex: field contains the value 100 while we manage the maintenance should not display the value 100 or make us the text as invisible field. whenever we submit the interview the value should be passed.

    I made the background color of the text in white field, but it reflects all the text fields. I need to make the text of the particular text as invisible field. Can someone give me a solution for it.

    Use two different attributes (the one that is indicated in the interview to the need - for example, as "the id selected user" or whatever the phrase is appropriate) and a different attribute, which is the mapped attribute.  The second attribute must not be on any screen of the interview (by thus "invisible" for the user).  Write a table of rules that concludes that the value of the attribute mapped on is EITHER static value or the selected/expected value according to some logic is appropriate to make a decision in your model of strategy.

  • 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"));

  • Referring to the value of a text field, not the legend

    How to refer to the value in a text field to make the data entered by the user "BOLD" / no fat without the caption of a field text in bold or not bold?

    Hello

    Two lines should do. The first turn the caption and the "BOLD" value, then the second changes the legend of back to normal:

    TextField1.font.weight = "bold";
    TextField1.caption.font.weight = "normal";
    

    Hope that helps,

    Niall

    Ensure the dynamics

  • Add the date and time to a text field when the form is submitted

    Is it possible to add the date and time to a text field where the user is clicking the button of form submit?

    I created a custom send form button and do not use the distribution process to collect the results and would like to have a time stamp of when the form has been sent.

    Thank you!

    Sure. Before your submit order add a command run JavaScript with this code:

    this.getField("SubmitDate").value = util.printd ("mm/dd/yyyy hh: mm", new Date());

    Change the field name or date that required such boss.

  • Display of the current year in a dynamic text field

    I have a project where I have to click a button and and the current year to display in the form YYYY in a dynamic text field.  My current code was written as:

    var myDate:Date = new Date();

    function whatYear(e:MouseEvent):void {}
    display_txt. Text = myDate.getFullYear ();
    }

    date_btn.addEventListener (MouseEvent.CLICK, whatYear);

    I get an Error 1067: Implicit coercion of a value of number type to a type unrelated to String.

    I also have to create one for the current date.

    Any sugessetions? I have tried everything I can thing of, but I'm new to AS3.

    Thank you!

    Try:

    display_txt. Text = myDate.getFullYear (m:System.NET.SocketAddress.ToString ());

    or

    display_txt. Text = String (myDate.getFullYear ());

    or

    display_txt. Text = "" + myDate.getFullYear ();

  • createDataObject in livecycle of value of a text field

    Hi Experts,

    Can someone help me story a data value of a text field createDataObject object. Content of the text field is multiline.

    These two simple lines are works fine in acrobat console, but not under a key click livecycle event.

    var cMyC = "sample string";

    this.createDataObject ("test.txt", cMyC);

    Please suggest.

    Concerning

    Arvind

    In LiveCycle Designer, you need to replace this with event.target to use Acrobat script methods.

    var cMyC = "sample string";
    event.target.createDataObject("test.txt",cMyC);
    
  • How to: Extract the first three characters of a text field

    Greetings-

    What is the best method to extract the first three letters of a text field?

    I need to extract the first three letters of a text field (surname in this case),
    so I add other components to create an identification number for
    a person.

    This identification number which must be created consists of the
    date of the person by birth, last 4 digits of social security number and
    the first three letters of the person's first name.

    Example:
    == > Date of birth: 15/11/45
    == > Last 4 SSN: 6654
    == > Name: Smith

    Identification number would be:
    == > 1115456654SMI

    Leonard B


    That should do the trick:

    I put your values in the variable, simply replace the names, according to the needs


    This removes all the string of the / your birthday (if it's a string!) and puts it in the variable id:

    It takes the 4 last letters/digits of your social security number string and adds it to the id:

    It takes the first thre letters/numbers from your last name variable, capitalizes and adds to the identification string

    It will be useful.

  • How can I validate numeric values in a text field?

    Hello

    Once more, I have a problem.

    I have a field in which the user must enter 10 digits in the model 999999-9999. The field should contain only numbers and must be exactly 10 characters. I have a validation script on the button "print", which prevent printing if required fields are empty or not properly filled out.

    I tried two ways of working this point, and I'm not satisfied with any of them, I can always print despite warning messages and validation scripts.

    1.

    I put the type numeric field, limited to 11 characters.

    Display model num {999999-9999}, change the model num {999999-9999} and validation model num {999999-9999}

    Problems using this solution: when I type 11 digits in the field (ex.12345612345) I get a warning message and 12.345.612

    But when I type 9 digts (e.g. 123456-123 or 123456123) I get no message warning and 000000-0000 or 012345-6123

    If I type alphabetic characters (e.g. 123456 abcd) I get no warning message and 000000-0000.

    2.

    I put the field in the text field, limited to 11 characters.

    The model text {999999-9999}, edit text model {999999-9999} and {999999-9999} model validation

    Now, when I type 11 digits in the field (ex.12345612345) I don't get any warning messages and 12345612345

    When I type 9 digts (e.g. 123456-123) I get no warning message and 123456-123

    When I type 9 digts (e.g. 123456123) I get a warning message and 123456123

    If I type alphabetic characters (e.g. 123456 abcd) I get a warning message and 123456 abcd.

    It works a little better as a text field, but I'm not satisfied at all.

    Someone at - there a solution to this?

    Additional I also want the hyphen to emerge automatically when you type.

    K

    Regular expressions are useful for this type of validation. The code below tf1 is a text field with a maximum length of 12.

    Form1.Page1.TF1::exit - (JavaScript, client)

    If (!) ((this.isNull))) {}

    var FO = this.rawValue;

    \d to match any character in the range 0-9

    regExp var = \d{6}\-\d{5}/;

    If (!) () {regExp.test (tf)))}

    xfa.host.messageBox ("the field must be in the format of 123456-12345.", "Validation", 1);

    }

    }

    {The \d{6}\-\d{5}/ expression tests 6 digits \d{6}, a dash-- and 5-digit \d{5}.

    Steve

  • Multiples of the same object/value in a contact field

    Hello

    In our table of Contacts of the E10, I feel a very strange behavior with a field called 'Type of Contact'. The field has been set as a drop-down list.

    Suddenly, multiples of the value stored in this field in the documents that get 2-way sync between E and SFDC, Ont. Thus, for example, if the value of the field

    has been 'Operator', the actual value is passed to 'OperatorOperator '. And the more you synch, the value is (as seems to be added).

    Then, the value would be "OperatorOperatorOperatorOperator".

    Wake up to the problem and setting values is tricky, because in the E10 user interface, you won't notice them if you use a drop-down list.

    I then changed the field to be a textbox to think what might help. And there is progress here. If there are more than two objects of value in the field,

    they present themselves. IF there were only two, everything looks ok just as you can see in the screenshot below:

    More survey close using that an outgoing external call Test reveals, however, that the value is actually duplicated:

    Also, if you have opened upward the selected record under Contacts the contents of the field (after changing text box):

    and then remove the selection (by tapping the button Delete), you could actually get a hint that something does not always work with the field:

    The cursor remains in the right-hand side of the text box, while he should have all the way to the left.

    Finally, I tried to fix the multiplied values SFDC and autosych back to Eloqua, but unfortunately the values do not get it fixed but

    keep duplicate values stored in.

    Any other questions/experiences? Is it a problem with the autosynch get leads NOT to crush, but rather just adding?

    WBR,

    -tatu-

    Some additional screenshots: fi

    The choice list values:

    Yep!

    That did the trick. It must have been a flaw in the external call-out who copied the value out. would have not thought about it in the first place...

    PS. and of course the external call test has shown that the field mapping was abt to do, IE send a duplicated value (although the field could have only a single (or double) value in db at the time.)

    WBR,

    Tatu

  • How to make the sum of numeric fields based on a value in a text field - charge memo

    I'm working on a Weekly Report of expenses employee that contains a list of charges and each can be marked as a company or a paid employee costs.  There are two fields in the form which is to show totals for the company and the employee paid expenses.  There are seven columns for amounts, one for each day of the week.  Expense Code text fields are called "Exp1" through "Exp7".  Digital type amount fields are called 'Amount1' by 'Amount7.  The fields under each column share the same name.  (Hope that makes sense).  A screenshot is below, and a link to the form is included in order to better understand the composition of the form.  I don't know how to for a total of to the top of all expenditures that are marked with a 'C' and all those marked with an "E".  I'm not well versed in Java.  Any suggestions would be greatly appreciated!  Thank you!!

    Link to the form:

    https://www.dropbox.com/s/sgsle5bkam2y4am/expense%20Report%20v1_0%20-%20LC%20Original.PDF? DL = 0

    Expenses.jpg

    I tried to implement your requirement in the form at the following link. If please test and let me know if it works.

    https://www.dropbox.com/s/v4n9kypdnplc857/expense%20Report%20v1_0%20-%20LC%20Original_V1.p df? DL = 0

  • Set by default to the value of another text field

    I imported a several page PDF in LiveCycle Designer.  I place a text field on each page of the PDF file.  I want the user can click in the text field on the first page and type its value.  Then I want to fill in any other fields of text on other pages.  How do I put the default value of the other fields to make this work?

    You can bind the fields in the object > tab link. Simply, name them all the same thing and change the global default binding.

  • How to fill out the USER name in a [RESOLVED] text field

    Hi all

    Forms 10g (10.1.2.0.2), Windows XP
    In my form, I have 2 blocks.
    1 block with a single element, where we enter a value and press on enter (this place you block2 and run the query).
    Block 2 (tabular) will get the records. This block2 have now 3 columns (caseid, userid, date).

    Now when I insert a new record, I just need to get the caseid only. And username and date must be filled in automatically.
    I am able to fill in the date by setting the property Initial Value * $$DATETIME$ $* for the column.
    And I tried many ways to fill the username in the userid column without success.

    I am tired of something like that
    In *When-New-Item-Instance*
    
    if :System.Cursor_Item is null then
         :BLOCK2.userid := Get_Application_Property(USERNAME);
    else
         null;
    end if;
    /*In this case, I can navigate to to the last recrord w/o any changes in the fetced records
     and while inserting the new record, USERNAME doesn't populate.*/
    In *When-New-Record-Instance*
    
    declare
         v_dummy varchar2(15) := null;
    begin
         v_dummy := nvl(:system.cursor_value, null);
         Copy(to_char(v_dummy), :System.Cursor_Item);
         if :System.Cursor_Item is null then
              Copy(null, :System.Cursor_Item);
              :BLOCK2.userid := Get_Application_Property(USERNAME);
         else
              null;
         end if;
    end;
    /* Nothing populates into the userid item while inserting new record */
    Any help please...

    Use one

    :BLOCK2.userid:=GET_APPLICATION_PROPERTY(USERNAME);
    

    or

    :BLOCK2.userid:=USER;
    

    in a WHEN-CREATE-RECORD-trigger.

  • By assigning a value to a text field not working PHP/javascript?

    I have a site to someone else coded, where a text field does a value that is assigned.

    Both
    Form1.textfield3.value = form1.textfield1.value;
    and
    Form1.textfield3.value = "99";

    not work, and the field is left blank.

    This same code works on Internet Explore (Win and OSX), Safari, Chrome and Opera. It does NOT work on Firefox 8 or 9.01 (Win and OSX) or 3.6.25. He used to work on an older Firefox, we had (unknown version).

    JavaScript is enabled; is there anything else we can check?

    If you check the error in Firefox (Ctrl + Shift + j) Console, you will see "form1 is not defined. This is because Firefox converts automatically form1 in reference to < form = "form1" name >. Instead, you must change the code a bit.

    You can fix the above error starting each function where you refer to form1 with this:

    Form1 = return ["form1"] var;

    However, probably just move the error to the next part of the notation (for example, textfield3). The proper way to refer to the value of a form field named is:

    document. Forms ["Form1"]. Items ["textfield3"]. Value

    or if you have set form1,

    Form1.elements ['textfield3'] .value

    If you have a few changes to make. Not sure if there are shortcuts.

    This forum focuses on the care of the end user. You can find more help web development on the mozillaZine Web Development Council. Separate forum, separate registration.

  • Why the Javascript that controls some new text fields does not immediately?

    I have created a form in Acrobat Pro XI.

    I've done several text fields asking for the room number. Other text fields create phrases based on these entries of room number. For example, if a user enters a room number in the text box "Room1", code for "TextBox1" is the following:

    var Numerobureau = getField("Room1").value;

    If (Numerobureau! = "") getField("TextBox1").value = "enter the area in square feet of room" + Numerobureau + "here:"

    else getField("TextBox1").value ="";

    I find that TextBox1 is not continually re-rendered as text changes "Room1". If I change the entry in Room1, TextBox1 remains unchanged for a while. After that I click on another box in my form and then get out again, the code Javascript in TextBox1 "catches up" and displays the correct text.

    I know that my code is correct, because FINALLY the text boxes behave correctly. Not must not all text fields be constantly recalculated at any time that a person interacts with the form?

    Also, check the order of calculation of field is correct.

Maybe you are looking for

  • Can I install a brand new SBS2011 OEM standard that is not used on an ESXi host?

    I have a client who needs anupgarde to their existing system of SBS2003. They buy a standard OEM of SBS2011 copy from Amazon despite me providing the details for a full purchase of reatil! I need to know, what I can put in place the new SBS2011 syste

  • DVD playback, not able to play the

    I used to be able to read the DVD as well commercial, but also of fact at home with Windows Media Player.  Now no DVD won't play.  What has changed?  Have I turned off something inadvertently perhaps, or am I missing something that I need to download

  • Personal profile settings GONE!

    Last night I was using my computer, it suddenly stopped. When I tried to start it, it wouldn't start for a little while, then it starts later. When he started, it's the weirdest thing: I logged on my account (Administrator) and rather that start, the

  • Samsung Galaxy S3 does not connect to the DELL laptop

    Hello I use the operating system Windows 7 Home Premium 64 - bit with the Intel processor i5-2450 M CPU @2.50 GHz. recently the past 4 months, I have observed that Samsung Galaxy S3 does not connect to the Dell laptop We could not see the content of

  • Problem using Adobe 8.1 Professional to create a PDF - error message

    I have an error message in Adobe 8.1 Professional when I try to create a pdf file - "files missing PDFMaker - you want to run the installer in repair mode.  Even if I say yes, it won't create the pdf file.  I tried install the software on a Windows 7