hide/show a group on one form based on the value of 2 different elements in another

kbfarrell

New Member
Hi - I am trying to hide/show a group based first on the following actions (originally captured via a separate form):
  • user makes a selection from a database join rendered as a dropdown list ('name')
  • from that choice I then need to obtain the information in another element ('type') - perhaps using a calc element?
  • show/hide the group information based on "type" once obtained
I have been able to show/hide based on one piece of information, but not the way I need this form to work.

Thank you in advance for the assistance!
 
So is "type" another element on the table the 'name' is coming from?

You could try using a cascading dropdown for the 'type', set it to hidden, and put your JS hide/show events on that.

-- hugh
 
Thank you Hugh .. correct ("type" is another element in the same table as "name). I have tried using a CDD to no avail.... it just won't pull the "type" - I will continue to mess around with the CDD element because I am sure it is something simple I am missing there.
-Kim
 
Another option would be to use the form autofill plugin. We recently added some code such that the autofill will trigger the 'change' event on any element it updates, so that should work to trigger a JS event on your 'type' element, if you fill it from the autofill. The 'type' could then be a simple field element, hidden.

-- hugh
 
One step closer... I now have the autofill piece working, but the JS event using 'change' doesn't seem to work (yet)... do I need to get an update on either the autofill plug-in or some JS so the change will trigger the event? I downloaded the plug-in March 10, in case that is pertinent.

It will work (show/hide) if I use "on-click" and click in the "type" field which isn't really practical for a hidden field.

Thank you again!
Kim
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top