Fill in textedit with selection field drop-down list
Hello, everyone!
Thank you much for the help that you give me for a long time.
I have never seek and find great solutions.
But this time, I have found nothing.
I need to fill a field of textedit from a selection in a drop-down list.
Is there a way to do this?
My fragment:
var myP0a = myGtop.add("panel", undefined, "JOURNAL"); myP0a.margins = [10,15,10,10]; var myTEMPLATE = myP0a.add("dropdownlist", ["","",200,25], ["", "Journal 01", "Journal 02", "Journal 03", "Journal 04", "Journal 05", "Journal 06"]); myTEMPLATE.selection = 0; var myGdoi = myG1.add("group"); myGdoi.add("statictext", undefined, "DOI:"); myGdoi.orientation = "row"; var myDOI = myGdoi.add("edittext", undefined, "000"); myDOI.characters = 34;
Based on the selection of myTEMPLATE, I want to fill in the myDOI field.
Is this possible?
Thanks in advance and sorry if this question is already answered in another topic.
The selection of a drop-down list is a ListItem object (or null), therefore, you just collect the selection.text from the drop-down list in the onChange of the drop-down list manager:
myTEMPLATE.onChange = function(){ if (this.selection===null || this.selection.text.length===0){ myDOI.text = "000"; } else{ myDOI.text = this.selection.text; }; // and maybe more stuff here };
or equivalently, in a shorter form:
myTEMPLATE.onChange = function(){ myDOI.text = (this.selection && this.selection.text) || "000"; };
Xavier
Tags: InDesign
Similar Questions
-
Fill the form with JS data; drop-down list
Looking for a way to have a drop of water to the bottom of the people or companies. When you select a company in the city, State, etc. the indo will automatically fill text boxes. What is my best options to go about this?
I tried to use this http://acrobatusers.com/tutorials/js_list_combo_livecycle1 and change the code to make it work for what Im tryign to do, but without success.
Any help would be great. Thank you.
Here is a link to a sample form that behaves this way: https://workspaces.acrobat.com/?d=gZNDS8dQQNqvwocUufXHNQ
The script control is in the case of the hit of the combo box. Pay attention to how the combo box is put in place, including the value of exports of each element. If you have any questions, post again.
-
Our company uses Adobe Reader as well as the version where send you it for signature, convert to word, excel etc.
What we are trying to do, however, is create the PDF document, save it to our readers of local network for use in a format PDF with editable fields, drop-down boxes to select and check boxes.
Can you help me please?
See you soon
Lucinda
Hi lucindab50782713,
Yes, you can save the document as a model using eSign service create a library template | services eSign so that it can be reused.
Kind regards
Nicos -
How to get a selection of drop-down list to complete another field with nothing
Hello
I have a drop down menu that fills another field according to what is selected (as shown here where Admin mistakes fills the next field with 6735-10-01).
However, there are 3 items in the drop-down list that I don't want to fill in the other with (basically, it must be empty during one of these 3 elements are selected, in contrast to how it returns zero in the example below). I don't know what to put in for the values to make it white.
Please notify.
Kind regards
ZeroZone
I don't know what your code looks like or where it is but you will need to add a conditional statement, such as:
If (DropDown.rawValue == "0" | ") DropDown.rawValue == "1" / * | "" etc, etc, * /)
TextField.rawValue = null;
on the other
TextField.rawValue = DropDown.rawValue;
Kyle
-
LiveCycle: How to select a drop-down list and fill in a text field.
I have a PDF on Adobe livecycle 8.0 that if selected will auto fill the field area:
GoalDropDownList: has points:
People with disabilities
Functional
Impairment
I would like that when disability is chosen this GoalTextField show:
Patient will return to the previous level of function.
When functional is chosen GoalTextField to see the
Patient able to stand 5 minutes
When the disability is selected GoalTextField to see the
Patient has full range of motion
Any help would be appreciated.
I'm new so can you include in java script where it must go out, enter, etc..
Thank you all.
In fact I don't know how to show a picture of this to illustrate what someone knows how?
Write the code javascript next to the drop-down list in the change event.
var
selectedValue = xfa.event.newText;
If
(selectedValue is 'Disability')
TextField1.rawValue
= "Patient will return to the previous level of function.";
on the other
if(SelectedValue=="Functional")
TextField1.rawValue
= 'Patient able to stand for 5 minutes.';
on the other
TextField1.rawValue
= 'Patient has full range of motion. "
Thank you.
-
JavaScript to fill the text based on the drop-down list field
Hello
I'm trying to write a javascript script to fill a "Textfield" based on what I select in 'Dropdownlist control' this has on a relationship between them. I tried to integrate the script on the category of 'Change' and the script was the following, but it didn't work. I would be grateful if someone can help me with the correct procedure.
Thank you
Vijay
Form1. #subform [0]. DropDownList2 [0]: change - (JavaScript, both)
function populateDescription() {}
if (document.subform [0].) {DropDownList2 [0] .value == "BIH")}
document.subform [0]. TextField83 [0] .value = "Burn in and PBI history."
}
}
I solved this problem by using a script to switch.
Please see my previous thread in this regard and Paul example will provide you with the right script for a script to switch.
http://forums.Adobe.com/thread/479021
script on the drop-down list as follows
Switch (this.rawValue) {}
case "dropchoice1".
FieldName1.RawValue = 'choice of text here ';
FieldName2. RawValue = "choice of text here ';
break;
case "dropchoice2".
FieldName1.RawValue = 'choice of text here ';
FieldName2. RawValue = "choice of text here ';
break;
}
Good luck.
-
How to fill a text box after selecting a drop down list?
I have created a form that has a drop-down list with different types of products. After a person chooses a product in the menu I would fill the text box with a description of the product. I'm a newbie here, but I thought that was far from using JavaScript to do this. But wasn't sure exactly where to put the code and do I have to put it on the text box or drop-down list. Any help would be appreciated Ive been looking everywhere for a week and can find an answer.
If (xfa.event.newText == "")
{TextField1.rawValue =""}"On your drop-down list by using Java Script on the * change event.
If you have three items in your list:
A
B
C
If (xfa.event.newText == "A")
{TextField1.rawValue = "You chose the letter A"}If (xfa.event.newText == "B")
{TextField1.rawValue = "You chose the letter B"}If (xfa.event.newText == "C")
{TextField1.rawValue = 'You chose the letter C'} -
I have a form with the fields of data entry simple Acrobat 11. I have, for the first time inserted drop-down lists and most of them is single-line fields. However, there are a few examples where my field must be larger to mask unwanted background. (The field will define the colur to white background are data entry, but I did not write the script for this.) When a selection is made, it appears centered in the field and I need to be aligned to the top.
I guess I can put a script on the Format tab, in the custom format script, but I don't know enough about Javascript to run on the syntax. I guess it would be a simple line or two of code. Can anyone help?
You have no control over this. They are always vertically centered. You can use a separate field in the drop down menu, however, and control its background. I suggest to use a read-only button.
-
Selections from drop-down list in the text box is not saved when PDF is saved/sent
I have a drop-down selection list and items can be added from the drop-down list in a textbox as multiple items. (this work all fine)
When I send the form as a PDF and then all the other field values is saved, except the values entered into the text selected in the dropdownlist control box.
How can I get these values to be saved in the PDF file so that these values disappear.
Thank you so much for everything tips to get this working so that when the form is sent by e-mail the selected values go with the form
.. run only in the file > Properties > tab by default , that the changes of Script preserve is set to Automatic.
Niall
-
Can I get the units in the field drop-down list?
Hello
I have a requirement that I have to fill out the field list drop-down (its caption is "Size unit") with 2 entries, they are ft2 and m2 (2 should be superscript), so I went to the range of the object and tried to copy/paste "2 and2m pi" but, 2 does not come as a great script!
Pls I want to know how to do?
Thank you
When you press Alt-Gr and 2 you get ².
So, you can directly enter the value as a square foot in the drop-down list.
-
Selection of drop-down list box does not appear
I've read several display on this site and others. I can't find the right solution to get the drop-down list box to work. I publish for Flash player 10 and AS 2. The final file will be imported into an Articulate/PPT file.
I'm simulating a form that my audience must fill. 2 text fields, I use a drop-down list box to select the appropriate entry. If they leave the screen of the form, I need save their answers, so they need not start from the beginning. I use global variables.
My problem occurs when I try to fill the drop-down list using the previously selected public response box. I tried to use setSelectedIndex. It works insofar as the choice highlights in the drop-down list box, but the actual selection does not appear in the text box. What I do pay Combobox.text = selection?
just assign the selectedIndex property.
-
How to enable/disable readonly in text fields, drop-down list field?
For example, I have a dropdown field named "DropdownField" and a field of text called 'TextField '.
Within 'DropdownField', I have four choices: Option 1, Option 2, another, combination. When the user first sees the "DropdownField", they see 'Select Option.' When the "DropdownField' select Option, Option 1 or Option 2 selected, I want to 'TextField' to be a read only field. However, what other or combination are selected, I want them to be able to grasp things in the 'TextField', which makes is not readonly. Also, tell someone selects 'Other', but realizes that they have made a mistake, I want them to be able to select Option 1, and have the return of 'TextField' read-only.
Currently I have the JavaScript code as a MouseUp on "DropdownField: action
var getField.DropdownField = drop;
var getField.TextField = text;
If (drop.value! = 'Other' | drop.value! = 'Combination')
{text.readonly = false ;}
on the other
If(drop.value = 'Other' | drop.value = 'Mix')
{text.readonly = true ;}
However, the JavaScript code above doesn't seem to work. Please let me know what I'm doing wrong!
You must use the event to validate drop-down list and use a script like:
var f = getField("TextField"); if (event.value === "Other" || event.value === "Combination") { f.readonly = false; } else { f.readonly = true; f.value = f.defaultValue; }
Also, set the option in the drop-down list "Value Commit selected immediately".
-
Data from the field drop-down list does not clear when the reset button is activated
Acrobat Pro XI
All field boxes are checked in the tab properties of the button actions... but when I click on the reset button of the form I created only the data in clear text fields, not any of the data that has been selected in a drop-down list. What I am doing wrong?
The 'rest shape' command returns the fields to their default values. If this
value is not empty, that's what he'll be back.
-
Auto complete text field drop-down list gets disoriented
Hello
I developed a page of connection with a field of user name and password, I made the username field to be 'Text with AutoComplete' and gave the sql code to fetch the result of falling down, while when I apply a style to overried the position of the region using the left and right drop-down list style attribute appers in the screen is not what I need. Can someone help me. I use Apex 4.2
Thanks in advance
Published by: eldho45 on December 10, 2012 20:42Joel_C wrote:
fac586 wrote:
eldho45 wrote:
Thanks a lot for your concern
My concern is that the security implications to use AutoComplete on a connection user name. This allows the infamous capture user names for each user on the system to work their way through the alphabet by KeyDown keypress without effort.
Could be an internal site (i.e. not exposed on the web).
Makes no difference. Internal hacking/fraud is still hacking/fraud. And it is much more likely to succeed. The negative person on the inside knows the details of partners/children/animals-domestic/cars their colleagues who will be in their passwords.
In addition, I'm sure it'll be fine because everybody uses passwords to secure great Don't they?
... pa55word rangers1874 simplythebest cfc1888 trustnoone ...
UM *.
sevco2012?
-
Connecting 2 fields drop-down list and have some appear field
I've read about the binding of the two drop-down lists when you select something in the first box and then it adjusts the options in the second drop-down list box. I love those who can use in the future. I have a question a little.
Can I have two lists that both selections control what fields appear below drop-down list? For the examples list 1 to A, B and C list 2 has red, Orange and yellow. I'll choose different combinations of the two and have different things to be displayed. At Red and has fields 1, 2 and 3 show. B and yellow display 1 and 3 and so on.
Is this even possible or do I need to create different combinations all in one field and script the different responses that, I think I know how to do?
Thank you!
Hello
The problem is that you are hiding the subform, BUT you try to assign to the presence of individual boxes in the subform visible. It won't work, because the subform itself is set to hidden.
Look at the boxes to check and see if you can group them in series that are always hidden or visible. Then script against subforms and NOT the boxes. If you can not group the boxes then you will just have to refer to them individually.
The textfield object was just a typo.
Niall
Maybe you are looking for
-
at the opening of thunderbird I get 9 to 10 messages that say "chrome such cannot be - everything because there is a file with the same name.Search Internet says to disable open research to solve this problem.so, how to disable one opens search?
-
After great to work for a year, I had problems recently with Time Capsule using our router, abandonment, etc... As did others on this forum, we had mult calls to ISP about the quality of the line. They said that we were crashing our data upstream lim
-
HP DV9700 not start. Farm in seconds after pressing the button walk / stop.
My HP Pavilion DV9700, who works under Vista, stopped working yesterday. I never did at the Windows startup screen. Messages on-screen messages which function key to press for configuration, see starting, etc... then stops.It started a day ago. I
-
HP Officejet Pro 8500 first Scan to E-mail Setup
I would like to know if someone has been able to get this option to work and if so it only works for a mail SMTP server or can set you it to an HTTP e-mail server IE; Windows Live Mail. Any input would be greatly appreciated. Thank you.
-
Whenever I try to call Dell to fix my computer they log out or never answer. Their computers are always broken, slow or buggy. Yesterday, my computer froze everything when trying to type an e-mail. Dell cannot create all what is good Dell will never