1
0
-1

While working on client site, I encountered the requirement, which seemed easy and intuitive to do, but I cannot seem to do it. Can someone please help me?

 

I have created a sample form to demonstrate.

https://tm.maestro.avoka.com/maestro/secure/design/3307

  1. There is a drop down box and attachment field, both of them are mandatory.
  2. When drop down selection is empty, we want to hide the attachment field. (On initialization, the attachment field is hidden)
  3. When the user selected an non empty option, the attachment field will appear.

Now the problem part

  1. When the user selected the empty option again, I am expecting an mandatory message shown, and the attachment field to be hidden.
  2. However, the result is the mandatory field is shown but the attachment is still shown.

 

Is there some way  to get it working?

 

Many Thanks

Mike Chen 

 

 

 

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      You can use:

      data.dropdown !== undefined && data.dropdown !== ''

       

      The initial value is different from what gets set when picking the empty item.

        CommentAdd your comment...
      1.  
        3
        2
        1

        Your visibility rule is as follows:

         

        When the dropdown value cleared the data.dropdown evaluates to undefined, not empty string.

        Just change your visibility rule to the following and this should resolve your issue:

         

         

        See also Advanced Debugging of Maestro Forms for handy techniques for debugging Maestro rules.

          CommentAdd your comment...