• Resolved monicaamb12

    (@monicaamb12)


    I would like to set the following condition and I don’t know how:

    I want 2 labels and you can enter a value on them (number from 0 to 10):

    Option 1: (Enter a value)
    Option 2: (Enter a value)

    Then a condition will appear: If option 1 is higher than option 2, it will appear some HTML text and if option 1 is lower will appear other HTML text.

    How can I do it? Do I need PRO?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @monicaamb12

    I hope you’re well today!

    I understand that “option 1” and “option 2” would be “nubmer” type fields where user can enter value, right?

    It’s doable but you will need multiple HTML type fields to show your messages and and additional calculation field. Here’s how to do this:

    1. add both number fields to your form (let’s say it’s number-1 and number-2) and set their limits to 0-10; make sure to set format to 0 decimals for these two fields.

    2. add a calculation field to the form; make sure to set its format to use 2 decimals;

    3. as a formula for calculation field simply divide number-1 by number-2 like this

    {number-1}/{number-2}

    4. now add first HTML field and set its visibility rule to be

    Show if ALL

    Calculation is less than 1

    This will be the message to show if first number is less than second.

    4. add second HTM field like this but this time visibility rule would be

    show if ALL

    Calculation is 1

    This field would show if both numbers are equal

    5. finally, add third HTML field and set visibility rule as

    show if all

    Calculation is greater than 1

    and this will show if second number is higher than the first one.

    This should work just fine for number from 1 – 10.

    You may need to add some additional rules and/or HTML field for cases when one or both of these numbers are 0 but the foundation would be as described above.

    Here you’ll find an example form like this so you can import it to your site, test and take a closer look at configuration:

    https://pastebin.com/9bNL3mJK

    Best regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @monicaamb12 ,

    We haven’t heard from you for over a week now, so it looks like the proposed workaround worked for you.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HELP WITH CONDITIONS’ is closed to new replies.