Hello everyone,
We have a form that was created to enter items more easily. On that form we have Item Group, Major Group, Minor Group and Item Template.
Right now, under the form control of Item Template, I have overwrote the modified method so that it finds the settings of the chosen Item Template and fills in the form accordingly. This works perfectly.
After a user it tabbing through and fills out Item Template, and Major Group, then it looks up what Item Template is chosen for that combination and fills it in. It does this in the modified method of Major Group.
I want it to execute the modified method of Item Template as soon as that happens so the rest of the form is filled out correctly. I had this working by using element.redraw() and then calling the modified method, but if I change the major group after that, the item template doesn't update.
For example
Let's say I have Item Group IG001
And two Major Groups MG001 and MG002
IG001 and MG001 use Item Template IT001
IG001 and MG002 use Item Template IT002
Also IT001 has Phantom set to yes
IT002 has Phantom set to no
Phantom is a setting for items and is on the form
So if a user tabs through, fills in IG001 and MG001, then using the modified method of major group, I am able to fill out item template with IT001. I will post the code below.
Now if I use the code element.redraw() and call the modified method of item template, then it works and fills out Phantom correctly, but if I go back and change MG001 to MG002, the item template doesn't change even though it hits the code.
If I get rid of element.redraw() and the line calling the modified method, then the item template will update as soon as I choose the Major Group.
I need both things to work. Hopefully this all makes sense. I tried to give us much detail as possible....