|
Gayle,
If the values in the City, State, Zip, and Phone fields must change immediately when a selection is made from the Location drop-down list, before the user tabs out of the combo-box field, place the following logic as the “Custom Keystroke Script” under the “Format” tab:
// Fields for City, State, Zip, and Phone var f1 = this.getField("City"); var f2 = this.getField("State"); var f3 = this.getField("Zip"); var f4 = this.getField("Phone"); switch (event.changeEx) { case "Location 1": f1.value = "City 1"; f2.value = "State 1"; f3.value = "Zip 1"; f4.value = "Phone 1"; break; case "Location 2": f1.value = "City 2"; f2.value = "State 2"; f3.value = "Zip 2"; f4.value = "Phone 2"; break; }
But you must also make the "Export Value" (under the "Options" tab) for each "Item" in the drop-down list equal to the values used in the "Switch" statement of the above _javascript_.
(The "changeEx" property contains the export value of the change and is available only during a Field/Keystroke event for listbox and combobox. For the combobox, the changeEx property is only available if the drop-down list is used, i.e. a selection (with the mouse or the keyboard) is being made from the drop-down list. )
+-----Original
Message-----
We have several locations. I want to set our letterhead that when you pick a location from the Street combo box the City, State Zip and phone fields automatically get filled in with the appropriate information. I am not sure what to call this problem so I can’t search for it in the archives. Can someone suggest a solution or at least some keywords for a search? Thanks.
Gayle Graham Senior Deputy District Attorney Support and Technical Services (925) 957-2226 direct line (925) 957-2240 fax
|
- [PDF-Forms] if javascripts Gayle Graham
- RE: [PDF-Forms] if javascripts Day, Tim G.
- Day, Tim G.
