Populate Text Field Based On Drop-Down List Selection
I am trying to build an application that will automatically populate that text field on the bases of users previous selection in the drop down list. The main thing would be that on the bases of item that a user will select from the drop down list the text field will automatically filled but the user should be allowed to edit those field. For example if a user selects a car then all the field related to the accessories will be filled but if the user wants to change the list of accessories then he can change those list. I just want to know how to Populate Text Field Based on Drop-Down List Selection?
Re: Populate Text Field Based On Drop-Down List Selection
If I am not wrong then you want to populate the text field on the bases of the user selection, but the thing is that if you want to populate the field with the predefined value then it will be easy but if you want to populate the field dynamically then it will be a bit difficult. If you are having the pre defined values with you then you can use simple scripting language for doing that.
Re: Populate Text Field Based On Drop-Down List Selection
For doing the things that you want to achieve you need to write a scripting code in the change event of drop down list.
Code:
var ListSale = this.boundItem(xfa.event.newText);
switch (ListSale)
{
case "1":
TextField1.rawValue = "fundamental accessories:\n- frame\n- wheels\n- glass";
break;
case "2": // different things
TextField1.rawValue = " fundamental accessories..."
break;
default:
break;
}
Try to write this code and after that if you face any difficulty then feel free to ask about it.
Re: Populate Text Field Based On Drop-Down List Selection
Through the use of Adobe LifeCycle Designer for the Adobe, and I am trying to fill the text field with use of multiple entries through the drop down list. I have managed to fill the text field on the bases of selection in the dropdown list but I am facing difficulty in maintaining things, when I am selecting item from the list the previous entries from the field are misplaced, and I need to maintain all the things.
Re: Populate Text Field Based On Drop-Down List Selection
You are trying to use the dropdown list or simple list, but the thing is that these two things does not support the multiple selection. In place of list you need to use the combo box for achieving the task. Combo box supports the multiple selection but for that the property of multiple selection should be activated. Try to use combo box and set the multiple section property to true.
Re: Populate Text Field Based On Drop-Down List Selection
I created a drop down menu which recuperates the fields of a table and displays them. I also have a description text box in my page. I saw what happened when a user selects a choice by clicking the drop down menu, it sees automatically receive the description (stored in the database) associated to this choice. So should I get the choice then I make an application to display the description associated with the selected choice on the text area automatically. Any related reply will be appreciated.
Re: Populate Text Field Based On Drop-Down List Selection
You store the elements of your table into a variable $ dir.
echo '<a href="?details=1"> detail to see a link </ a>';
if ($ _GET ['details'] == 1) echo $ dir ['details'];
and by default, you put details to 0. If that does not work for you then take an application in the field and its description from sql and create a table in javascript. And use a javascript function on the 'onChange' down menu to update the text "description" by getting the proper description in the table javascript.