Okay
  Public Ticket #3613801
Visibility conditions, forms
Closed

Comments

  •  2
    Bent started the conversation

    Hi, need some help with the visibility condition. I want to have a check-box field halfway down a form setup, so if anyone does not need or want the rest of the form setup to show or be sent (the last half of the form is a calculator), they can opt out by marking the check-box field. 

    I do not see any good tutorials or manuals to describe how I use the VC setup, so I´m a bit lost on that part. Could you either give me instructions or point me to resources that can make me understand the logic?

  •  751
    Igor replied

    Hi,

    I will forward your ticket to the second level support, so they can proceed in helping you.

    Thank you for your understanding!

    Regards,
    Igor

  •  390
    Denys replied

    Hi, Bent,

    sure. Visibility Condition is a feature that allows you to display some Form Field widgets only when certain fileds have certain condition.

    Lets say you have two Number Field widgets with names "one" and "two". In order to set Visibility Condition in second field (with name "two") select the widget in Elementor Editor, go to Visibility Condition tab and press add item:

    1571047366.png

    the above configuration of Visibility Condition item means that Number Field with name "two" will be visible on the page when Number Field with name "one" will contain a number that would be higher then 10. You can choose the condition between "equal", "more", "more or equal", "less", "less or equal" and "not equal". Also you can add as many Visibility Condition items as you'd like per Field widget.

    In your particular example you can assign some value to Checkbox Field, for example 1, and add Visibility Condition to all the fields below the Cheeckbox Field with Field Value option set to 1 and Condition set to Equal. This means that all those fields will be visible only if Checkbox Field is checked (has value equal to 1). Otherwise, they won't be visible. Please notice, that in this case you have to add Visibility Condition in each widget separately.

    Let me know if I was clear enough.

    Denys

  •  2
    Bent replied

    Hi Denys! 

    Needed a bit of "wrapping my brains" around it, but when I realized that the checkbox field did not need any input in the VC field and that I should use the field name (and value) from the checkbox field, it did make sense. And I got to hide the number fields by clicking the checkbox by reversing the condition to "not equal". 

    So that has now come to a resolution. Thank you!

    One other question: I use a dropdown field in the form that defines values as numeric, as it has to be used in the calculate function I have in my form. 

    But when I use the "action after submit" and set up an email message, the only value I get from that dropdown field is a number (of course). 

    I think the display field is: {form_fields.type_pakke} (the latter is the form field name). Is there any way to also display the text value? 

    The field in question is a drop-down field with three options (three packages for web design type; ordinary, with text value/label: "Ordinær nettside" with numerical value identical to the cost for the customer in NOK: 5900 - and two other alternatives with text and numerical values. As you understand, It would be great if the mail to myself, but more importantly, the copy to the customer, has both text value/label and the number value.

    Please advise!

  •  390
    Denys replied

    thanks for the details.

    You can choose "Text Values" in Dropdown Value Handling option and assign value in items like "number 30" or "Full Service $500". You can display this text in your email message like this: "Dear customer, thank you for purchasing:  {form_fields.type_pakke}." In email you and your customers will see "Full Service $500" instead of {form_fields.type_pakke}. Does this answer you question? Please let me know

  • RELIEF replied

    Hi,
    I'm using a Dropdown Field to Display some fields with Visibility Conditions logic. Is it possible to use Text Values rather than using a number to display somthing ?

    Attached files:  Screenshot 2024-08-14 at 1.32.51 PM.jpg
      Screenshot 2024-08-14 at 1.34.29 PM.jpg

  •  390
    Denys replied

    Hi, RELIEF,

    no, you can only use numbers with Visibility Conditions. If your Dropdown Field has Values Handling option set to "Text Values" and you'd like to add Visibility Conditions then please add some other Field widget that will have numbers as values. Hope this help. Let me know if you have questions.

  •  1
    Yo replied

    Hi, Denys, 

    If I want to achieve two things simultaneously: "the visibility of the field" (I see your response is to set the field to "Number"), and "the field result as text when receiving" (I see your response is to set the field to "text"),

    Currently, these two requirements are conflicting. Is there a solution that allows both visibility to be hidden or shown and the field to be displayed as text when Email? Or do you have any good suggestions?

  •  390
    Denys replied

    Hi, Yo!

    the only way to achieve this is to add some additional field that would be responsible for the Visibility Condition part, then your main field can have Text Value when receiving Email. For example, Checkbox Field will contain yes / no question and have 0 (no) and 1 (yes) options, then if user will check this Checkbox, values will be 1, which will reveal main Form widget that has text values.

    Hope this helps, let me know what your layout is, and we'll come up with something.

     

  •  1
    Yo replied

    Hi, Denys, 


    One of my layouts is

    1. "Radio Button Field - Numeric Value (Field Name : PD )" Pick up (Button Value : 1) and Drop off (Button Value : 2) 

    2. "Text Field" - Label : Pick up Day -- Visibility Conditions (PD=1)
    3. "Text Field" - Label : Drop off Day -- Visibility Conditions (PD=2)


    If I want "Pick up" or "Drop off" to appear in the email content, how should I set it up? (Now it's 1 or 2)

  •  390
    Denys replied

    In this case I would suggest to simplify a bit your layout:

    1. Make Radio Button Field Values Handling: Text Values.

    2. Remove second Text Field and rename First, for Example just "Day"

    then in your Message option you can just write: "You selected: {form_fields.pd} that will be on {form_fields.day}"