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

    (@codepeople)

    Hi,

    If you want get the value of a custom field, for example, with the attribute: name=”htmlfield”, you simply should use the following snippet of code as part of your equation:

    (function(){
    var htmlfield = jQuery('[name="htmlfield"]').val();
    ....
    })()

    and then, replaces the symbols …. with the rest of the equation where to use the htmlfield variable.

    Best regards.

    Thread Starter pscrignoli

    (@pscrignoli)

    Thank you for fast response. But could you give me an example?

    Ex: htmlfield1 + htmlfield2

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Following the logic of the previous ticket, use the equation below:

    (function(){
    var htmlfield1 = jQuery('[name="htmlfield1"]').val();
    var htmlfield2 = jQuery('[name="htmlfield2"]').val();
    return htmlfield1+htmlfield2;
    })()

    As you are using custom fields in the equation, please, remember to insert a button in the form, and select “Calculate” as the button’s type.

    Best regards.

    Thread Starter pscrignoli

    (@pscrignoli)

    Not working ??

    Thread Starter pscrignoli

    (@pscrignoli)

    I’ll try again later.
    One last question: How can I copy DIV field from field builder? I have a big DIV that I need to repeat 20 times. Is that possible?

    Thank you again.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Could you send me the link to your webpage to check the equation in action, please?

    About the action to duplicate the “DIV” fields, I’m sorry, but this action is not supported in the current version of the plugin.

    Best regards.

    Thread Starter pscrignoli

    (@pscrignoli)

    Plugin Author codepeople

    (@codepeople)

    Hi,

    First, in javascript you cannot use numbers as names of variables, so the equation:

    (function(){var 1= jQuery('[name="01inicial"]').val();var 2 = jQuery('[name="02inicial"]').val();return 1+2;})()

    is wrong, the correct would be:

    (function(){var v1 = jQuery('[name="01inicial"]').val();var v2 = jQuery('[name="02inicial"]').val();return v1+v2;})()

    Furthermore, you should to insert a button in the form, and then, select “Calculate” as the type of the button.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘HTML field’ is closed to new replies.