• Resolved henriquenunes

    (@henriquenunes)


    Hi, first I want to congratulate you on the great work being done to keep the plugin in the community.

    I’ve been using it for a few days now and I’m finding it the most top of all existing plugins.

    I’ve searched the entire forum and I couldn’t find my question and maybe you can help me. I’m a beginner with JS, and I have some difficulties at the moment.

    I have 04 radio buttons and I want to check when it is between certain values, some radio buttons are disabled and others not. I made a function and I’m trying to disable it through the command: document.getElementById(“fieldname13_1_rb1”).disabled = true;
    But it’s going wrong. What am I wrong to disable the radio button?

    (function () {

    var valor_digitado = fieldname2;

    if (valor_digitado >= 5000 && valor_digitado <= 9999) {
    document.getElementById(“fieldname13_1_rb1”).disabled = true;
    }
    return valor_digitado;
    })();

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

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

    (@codepeople)

    Hello @henriquenunes

    The texts in the equations with the format fieldname# are replaced by the corresponding fields values. For this reason, you can assign the fieldname2 to the valor_digitado variable.

    If you want to disable, for example, the radio button with the “moderado” value, you can use the following piece of code:

    (function () {
    var valor_digitado = fieldname2;
    
    if (valor_digitado >= 5000 && valor_digitado <= 9999) {
    getField(13).jQueryRef().find('[value="moderado"]').prop('disabled',true);
    }
    return valor_digitado;
    })();

    Best regards.

    Thread Starter henriquenunes

    (@henriquenunes)

    Thanks for the quick feedback.
    Problem solved.
    Strong hug.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Input Radio disabled Property’ is closed to new replies.