• Resolved justin_19

    (@justinsmith19)


    Hi guys

    I’ve created a form with a few dependencies for 2 dropdowns (Please see form on page linked).

    For some reason, it does not show the final calculated value.

    Not sure if somehow you can see the code added in the form in the backend or whether I need to provide the code somehow.

    Please advise
    Thanks

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

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

    (@codepeople)

    Hello @justinsmith19

    If you configure the calculated field as hidden, by ticking the checkbox: “Hide Field From Public Page” in its settings, it will never be visible, even with dependencies. So, if you want the calculated fields be hidden or visibled by dependencies, you should untick their checkboxes: “Hide Field From Public Page”.

    Best regards.

    Thread Starter justin_19

    (@justinsmith19)

    Hi @codepeople

    I don’t think I explained my problem correctly.

    On the form (on the page linked), the field labeled Granite Benefit Plan or Marble Benefit Plan does not show any value.

    The hidden fields are linked to the final calculated value (Granite Benefit Plan).

    Hope this makes sense.

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello @justinsmith19

    The issue is simple, the equation associated to the fieldname25 is:

    
    (function(){
    
    if(fieldname16 == 1) return fieldname4*1;
    if(fieldname16 == 2) return fieldname9*1;
    
    })()
    

    But the values of the fieldname4 and fieldname9 are the texts: Plan A, and Plan B respectively.

    You cannot multiple a text by a number.

    Best regards.

    Thread Starter justin_19

    (@justinsmith19)

    Ahh!

    Copied the code from a previous form… must’ve missed the *1.

    Thanks so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dependencies and if statements’ is closed to new replies.