Good Afternoon All,
I am not very familiar with subforms, so PLEASE help!
I have created a file with a drop down box called "Applicant Type". There are 4 possible values in this box: "Individual" "Partnership" "Assocation" and "Corporation".
I have created 4 subforms with corresponding names: "IndividualSub" "PartnerSub" "AssociationSub" "CorporationSub". All of these subforms are "hidden" in the Initialize Event of each one.
I am trying to create a script that makes the appropriate subform become visible when the corresponding option is selected from the drop down box.
I have inserted this script in the Change event of "Applicant Type" (FormCalc, Client):
if ($.rawValue==3) then IndividualSub.presence="visible" else IndividualSub.presence="hidden" endif
if ($.rawValue==2) then PartnerSub.presence="visible" else PartnerSub.presence="hidden" endif
if ($.rawValue==1) then AssociationSub.presence="visible" else AssociationSub.presence="hidden" endif
if ($.rawValue==0) then CorporationSub.presence="visible" else CorporationSub.presence="hidden" endif
The first time I activate the drop down, nothing happens. Each subsequent activation of the drop down makes one of the subforms appear, BUT, usually not the correct one. If I select "Corporation", I may get the "AssociationSub", etc.
I am using LiveCycle Designer ES2 v9
I would be glad to upload the file for anyone to look at, if you will provide me instructions on how to do so.
thanks in advance!
Gene-O
Solved! Go to Solution.
Views
Replies
Total Likes
if (event.newText=="Individual") then IndividualSub.presence="visible" else IndividualSub.presence="hidden" endif
if (event.newText=="Partnership") then PartnerSub.presence="visible" else PartnerSub.presence="hidden" endif
if (event.newText=="Assocation") then AssociationSub.presence="visible" else AssociationSub.presence="hidden" endif
if (event.newText=="Corporation") then CorporationSub.presence="visible" else CorporationSub.presence="hidden" endif
I am assuming the rest of your syntax was already correct. I rarely use FormCalc. I mostly use JavaScipt.
Views
Replies
Total Likes
Try using event.newText instead of $.rawValue which is giving you the old value.
Views
Replies
Total Likes
thanks for your reply, BUT, I'm not familiar with this at all. Can you give me an example of how to insert it into my script?
thanks!
Views
Replies
Total Likes
if (event.newText=="Individual") then IndividualSub.presence="visible" else IndividualSub.presence="hidden" endif
if (event.newText=="Partnership") then PartnerSub.presence="visible" else PartnerSub.presence="hidden" endif
if (event.newText=="Assocation") then AssociationSub.presence="visible" else AssociationSub.presence="hidden" endif
if (event.newText=="Corporation") then CorporationSub.presence="visible" else CorporationSub.presence="hidden" endif
I am assuming the rest of your syntax was already correct. I rarely use FormCalc. I mostly use JavaScipt.
Views
Replies
Total Likes
Thank you so much Steve!!!!
Views
Replies
Total Likes