Show or Hide element

Status
Not open for further replies.

jeanl

Member
Hello

I have a form with a dbjoin element. I would like to add an element that should be hidden if the dbjoin element has a certain value, or if I select a specific option in the dbjoin (rendered as dropdown).

I set up the 2nd element as a field, and then I added some pre-defined JS options to the 1st element.

On load, it hides element 2, and then onselect, it still hides if the incorrect choice is made in element 1, but if I choose the specific option, onselect, it does not show element 2.

Can anyone please advise?

Thanks in advance.
 
Hi Hugh

Element 1 = Customer and is a db join rendered as dropdown.
Element 2 = Field, which I want to use to add an email address, IF, customer = Private Customer.

When the form loads, the element 2 is hidden.

upload_2016-8-23_11-34-27.png
 
I think I would use a change event rather than a select event. The select will run when the element is selected and the condition will check on the value at that point, I think you want to check once it has been changed by the user.
 
A dbjoin element has a value (usually id[recommended], so 1,5,7...) and a label.
Just tested: you must compare to the value.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top