• Resolved rotertal

    (@rotertal)


    Hi CFF-Team!

    When loading the form, the first selection works. When I change the dropdown value (fieldname51), nothing happens anymore:

    My cff-field (hidden aux):

    (function(){

    var selected = getField(fieldname51|n).val();

    if (selected == 1) {

    getField(fieldname21|n).jQueryRef().find('input').css('color', 'blue');


    } else if (selected == 2) {


    getField(fieldname30|n).jQueryRef().find('input').css('color', 'blue');

    }

    return '';

    })()

    Do I need some kind of event listener?

    Thank’s in advance!

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

    (@codepeople2)

    Hello @rotertal

    Thank you so much for using our plugin.

    You need only to edit the line of code in the equation:

    var selected = getField(fieldname51|n).val();

    as follows:

    var selected = fieldname51;

    And that’s all.

    Best regards.

    Thread Starter rotertal

    (@rotertal)

    Works great, thanks a lot!!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change color based on selection’ is closed to new replies.