• Resolved rotertal

    (@rotertal)


    Dear CFF-Team,

    I’m trying to get the raw value from one cff-field to another cff-field:

    (function(){
    switch(fieldname121) {
    case 1: return fieldname57; break;
    case 2: return fieldname58; break;
    case 3: return fieldname59; break;
    }
    })();

    (function(){
    switch(fieldname121) {
    case 1: getField(fieldname107|n).setVal(fieldname57);
    case 2: getField(fieldname107|n).setVal(fieldname58);
    case 3: getField(fieldname107|n).setVal(fieldname59);

    }
    })();

    In every case it only grabs the (first) value. How can I get the raw value (with the entire format like 15%, etc.)? I know that it works with html-fields but then I’m having troubles to execute the function.

    King regards!

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

    (@codepeople2)

    Hello @rotertal

    Thank you so much for using our plugin. The plugin preprocesses the fields’ values in the equations to use them in mathematical expressions. However, you can use the |r modifier to use the field’s raw value without preprocessing.

    (function(){
    switch(fieldname121) {
    case 1: return fieldname57|r; break;
    case 2: return fieldname58|r; break;
    case 3: return fieldname59|r; break;
    }
    })();

    Best regards.

    Thread Starter rotertal

    (@rotertal)

    Perfect, thank you so much!

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