• Resolved kodzhamanov

    (@kodzhamanov)


    Hi, Guys!
    You have created an amazing plugin! Thanks for that!

    I am struggling with something maybe very easy.
    I have two fields – one dropdown (fieldname12) and one numeric(fieldname14). They have the same functionality.

    Both fields multiples with fieldname1.

    The result I want to achieve is the user just to pick one of the two options -> to enter the value by himself or to pick one of the per set rates.

    I came to this solution :

    IF(fieldname12>0,SUM(fieldname12*fieldname1), IF(fieldname14>0, SUM(fieldname14*fieldname1), IF(fieldname12,fieldname14, "Error", "Error2 ")))

    and it kinda works.

    If I choose fieldname12 and calculate everything is fine, the same when I choose fieldname14.

    But when the user tries to use them both fields it is kinda messy. I want to prevent this operation somehow.

    For example, if the fieldname12 has value the fieldname14 to be disabled and vice versa.

    Or somehow with conditional logic to give the user maybe with a radio button to choose one of the two.

    Any help would highly be appreciated.

    Thanks,
    Svet

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @kodzhamanov

    You’re creating an ambiguity in your form, the plugin does not know which of fields you want to use in every moment.

    So, the idea would be fix first the ambiguity, for example, if you enter as the first choice in the fieldname12 field the “Enter it manually” with value zero, and define the fieldname14 as dependent on this choice (more information about dependencies in the following post of the plugin’s blog: https://cff.dwbooster.com/blog/2020/03/01/dependencies/)

    Now, the equation can be implemented as follows:

    
    IF(fieldname12, fieldname12*fieldname1, IF(fieldname14, fieldname14*fieldname1, 'Error Message Here'))
    

    and that’s all.
    Best regards.

    Thread Starter kodzhamanov

    (@kodzhamanov)

    Thanks!
    Exactly what I am looking for.
    Good luck, guys!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable one field when another is activ’ is closed to new replies.