Support » Plugin: Calculated Fields Form » hide predefined value

  • Resolved civilvicky

    (@civilvicky)


    Is it possible to hide the predefined value in the numbers field. For example I have set the predefined value of number field as 1 but I don’t want to display it.

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

    (@codepeople)

    Hello @civilvicky

    Thank you so much for using our plugin. The default values are values. You cannot hide them. You can simply do not assign default values to the fields but check them in the equations.

    For example, assuming the number fields are fieldname1 and fieldname2 and the equation in the calculated field fieldname1+fieldname2. Instead of assigning default values to the number fields, you can use them in the equations:

    IF(fieldname1, fieldname1, 5)+IF(fieldname2, fieldname2, 8)

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    please help me out with the IF condition,

    I have created a ratio calculator. The equation goes as follows

    If (fieldname18<fieldname22) return (fieldname22/fieldname18);
    and IF(fieldname18>fieldname22) return (fieldname18/fieldname22));

    Plugin Author codepeople

    (@codepeople)

    Hello @civilvicky

    Your equation can be implemented by using the IF operation as follows:

    IF (fieldname18<fieldname22, fieldname22/fieldname18, fieldname18/fieldname22);

    Or by using the if conditional statement:

    (function(){
    if(fieldname18<fieldname22) return fieldname22/fieldname18;
    return fieldname18/fieldname22;
    })()

    Even you can implement the equation with no conditional statements or operation:

    MAX(fieldname18,fieldname22)/MIN(fieldname18,fieldname22)

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    The last code was pretty easy. Thank You once again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.