• Resolved vel123

    (@vel123)


    how to put the image in calculator field using calculator field plugin. Because i want to use 2 combination condition do display the image.

    Like for example, The product name label having tape and silicon as 2 dropdown option and then next label thickness having 3 options as dropdown like 4, 6, 8. So now If the user select the tape and then 4 means i want to show image1, then if the user selected silicon and option 6 means show some other image ….etc

    https://www.ads-software.com/plugins/calculated-fields-form/

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    In this case you should to use a calculated field as auxiliary, and return an unique result based on the combination of the values in the previous fields, for example if the fields are:

    fieldname1 with the choices: tape and silicon

    fieldname2 with the choices: 4,6,8

    You can insert a calculated field, and select the option to hide the field form the public web form (because it is not relevant in the form’s interface)

    and enter as its equation:

    (function(){
    var f1 = fieldname1,
    f2 = fieldname2;
    
    if(f1 == 'tape' && f2 == 4 ) return 1;
    if(f1 == 'silicon' && f2 == 6 ) return 2;
    
    })()

    and finally, you simply should define in the calculated field the dependency rules to display an image field if the value returned is 1 or the other image field if the value is 2….

    More information in the following link:

    https://cff.dwbooster.com/documentation#dependencies

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘how to put the image in calculator field using calculator field plugin’ is closed to new replies.