Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Get values from array with event.changeEx
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Get values from array with event.changeEx

 Post Reply Post Reply
Author
Michel View Drop Down
New Member
New Member
Avatar

Joined: 11 May 2017
Points: 1
Post Options Post Options   Quote Michel Quote  Post ReplyReply Direct Link To This Post Topic: Get values from array with event.changeEx
    Posted: 11 May 2017 at 1:19pm
Hi,

I have a PDF that allows users to fill out forms.
One of the features is that if a user selects an item from a combobox other fields are filled.

So here is what I did:
var company = ["comapny name", "street", "Postcode", "City", "Country"];
var company1 = ["comapny name1", "street1", "Postcode1", "City1", "Country1"];
if (!event.willCommit){ 
    if (listCompany.value == "comapny name"){
        this.getField("fldStreet").value = company[2];
    }
    if (listCompany.value == "comapny name1"){
        this.getField("fldStreet").value = company1[2];
    }
}

This almost worked. Read online that I should use event.changeEx.
This results in:
var company = ["comapny name", "street", "Postcode", "City", "Country"];
var company1 = ["comapny name1", "street1", "Postcode1", "City1", "Country1"];
if (!event.willCommit){ 
    if (listCompany.value == "comapny name"){
        this.getField("fldStreet").value = event.changeEx;
    }
    if (listCompany.value == "comapny name1"){
        this.getField("fldStreet").value = event.changeEx;
    }
}
But How can I fill the other fields containing content from my array?




Back to Top
Sponsored Links


Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4059
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2017 at 6:24pm
See Changing another field with combo box (drop down) selection by Thom Parker for a different approach. One could even populate the drop down list from the Department data structure.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.09
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.016 seconds.