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

    (@codepeople)

    Hi,

    Yes of course, but in this case you should treat the number as a text:

    (function(){
    var number_as_text = ''+1234;
    var result = 0;
    for(var i=0,h=number_as_text.length; i<h; i++ )
    {
    result += number_as_text.charAt(i)*1;
    }
    return result;
    })()

    In the previous code you simply should replace the number 1234, but the fieldname# corresponding in your form.

    Best regards.

    Thread Starter westefan

    (@westefan)

    Many thanks, that works perfectly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘cross sum’ is closed to new replies.