• Resolved malpica

    (@malpica)


    Hello,

    I have an input type number (for example fieldname1) and I need set max value with value of an a calculated field form (fieldname2). How can I do it?

    Best regards

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

    (@codepeople)

    Hello @malpica,

    Assuming the number field is the fieldname1, and the calculated field has associated the equation: fieldname3+fieldname4, and you want this sum be the “max” number that restricts the fieldname1, the equation should be edited as follows:

    (function(){
    var result = fieldname3+fieldname4;
    jQuery('[id*="fieldname'+'1_"]').attr('max', result);
    return result;
    })()

    Pay special attention the piece of code:

    jQuery('[id*="fieldname'+'1_"]').attr('max', result);

    The “max” attribute is assigned programmatically.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘set max value’ is closed to new replies.