chris.paschen
Chris Paschen
I have an element on a form that needs to be shown or hidden at the time of form load based upon data in a couple different external tables.
What I did:
Created an element on the form - can_review
On the form - plugin: php - onBeforeLoad
this gets the necessary data and sets the value in the can_review field as 0 or 1
On the can-review element set javascript rules (onLoad) to show/hide the element to be hidden (as I've done on many other occasions). [onLoad if = 1 show; if != 1 hide]
However, even though I can see that the onBeforeLoad function IS working (the value in can_review IS getting set properly), it appears that the javascript isn't having any effect at all on the element to be hidden/shown (it is always shown).
I've also tried other logic for the javascript (if =0 hide; !=0 show, etc.) and still the element is always shown.
Is there a different place to add my form plugin that would allow this to work?
Or is there another way to do this?
(Other javascript entries on the form are working fine)
What I did:
Created an element on the form - can_review
On the form - plugin: php - onBeforeLoad
this gets the necessary data and sets the value in the can_review field as 0 or 1
On the can-review element set javascript rules (onLoad) to show/hide the element to be hidden (as I've done on many other occasions). [onLoad if = 1 show; if != 1 hide]
However, even though I can see that the onBeforeLoad function IS working (the value in can_review IS getting set properly), it appears that the javascript isn't having any effect at all on the element to be hidden/shown (it is always shown).
I've also tried other logic for the javascript (if =0 hide; !=0 show, etc.) and still the element is always shown.
Is there a different place to add my form plugin that would allow this to work?
Or is there another way to do this?
(Other javascript entries on the form are working fine)