select that will hide and show input on edit

select that will hide and show input on edit

ofirk12ofirk12 Posts: 15Questions: 8Answers: 1

Hey, I have in my DB two payment, payment1 payment2, I want in the editor that will be select with 1 payment or split payment. if the user choosing 1 payment will show just 1 field payment 1, and if he choosing split payment will be 2 inputs with payment 1and payment 2 but in default payment 1 and payment 2 will be hidden.

How can I do it?

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @ofirk12 ,

    You can use dependent() for that, there's a few examples on that page that should get you going,

    Cheers,

    Colin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    See also example here.

This discussion has been closed.