I'm trying to make a form in which I have the following fields:
Now I want to do a drop down list because I have several contacts, but I want it so that when I chose the person in the "To:" field, it will put the company, email and fax for that person in the rest of the fields. I put the details into drop down menus for the rest of the fields but I can't get it to relate joe shmoe to his email email@example.com and so on.
Where is the information going to reside that ties the To, Company, Emal and Fax to the user that is selected in the dropdown? Are you going to hard code it or is it in a database somewhere, or maybe a Web Service call?
Once we know that we can point you in the right direction.
I'm going to hardcode it, databases are too advanced for me right now! haha
a 'simple' solution.. you could add script to the CHANGE event of the drop down list such as:
if (xfa.event.newText == "Joe Shmoe")
emailAddress.rawValue = "firstname.lastname@example.org";
company.rawValue = "ABC";
and so on..
Sorry for being so annoying, but I'm really really new to using forms, I'm not too bad with computers but I'm just not sure where the change event of the drop down list would be or how I can get to it. Could you please explain a bit more?
About a month later, but I got it to work! thanks very much, would have never figured it out on my own 😄
I would like to hardcode this same example except there are 500 records or more. For example, the user puts the Product Code in the textbox and then the description that matches that Product Code should automatically populate in the Description textbox (which will be read-only).
However, I basically want to put the Product Code and Description into an invisible list box and then loop through the list box to match up the description for the product code the user enters and put that information into the description textbox.
The manager wants no DB connection for these forms.
So you will hardcode the values in the listbox ....I sure hope one does not change. I would not use a list box because you will have to loop through each enter to get your match. Can you not use some sort of array structure with and index to make it easier and more efficient to make the match?
Actually, the listbox info would not change; however, more would and could be added to the list.
I am very interested in using an array structure with an index. How do I even get started on that?
I am a beginner programmer so if you can help me get started, I am sure I can finalize.
Thanks for your quick response; still working on this project for which they would like today.