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

    (@codepeople)

    Hi,

    Through the attribute “Add Css Layout Keywords”, available for all field in the form, it is possible assign a classname to the field.

    For example if you assign the classname “my-class” to the field, you can get it with the jQuery expression: jQuery(“.my-class”), and its value with: jQuery(“.my-class”).val()

    Best regards.

    Thread Starter McTwist

    (@mctwist)

    Thanks for the fast response!

    No such luck. This is what I’m seeing:

    <input id=”fieldname1_1″ name=”fieldname1_1″ readonly=”” class=”codepeoplecalculatedfield field small” type=”text” value=”” dep=”” notdep=””>

    I can access this with jQuery without having to apply a class to the surrounding field div. It’s the value=”” that I’m talking about. It’s empty because the value is not actually being placed in there. The script below the calculated field – this:

    fbuilderjQuery.fbuilder.calculator.addEquation(“fieldname1_1”, “prec( (fieldname3_1+fieldname4_1+fieldname5_1) ,2)”, {“suffix”:””,”prefix”:”$”,”groupingsymbol”:””,”decimalsymbol”:”.”}, [], “_1”);

    does the math but does not apply it to the input’s value.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The equation associated to the calculated field is evaluated dynamically when change the value of any fields that are part of the equation. I’m sorry, but I don’t understand exactly what do you need.

    Best regards.

    Thread Starter McTwist

    (@mctwist)

    I need to know how to capture the equation’s output. I know the number is dynamic, but it still exists. You can select it when using the form, but the way the script is built, the number is placed over the input box instead of setting the value of the <input> within the dfield div.

    <div class=”dfield”>
    <input id=”fieldname1_1″ name=”fieldname1_1″ readonly=”” class=”codepeoplecalculatedfield field small valid” type=”text” value=”” dep=”” notdep=””><span class=”uh”></span>
    </div>

    I would like to set the input form element’s value to the equation’s result via jQuery or Javascript.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The equation is not assigned directly to the calculated field, the equation is generated through the <script></script> tags, when the calculated field is displayed in the form. If you want make the calculus by yourself, don’t use calcualted fields, and implement your own codes, for example, using numeric fields, or any other type of fields available. But your code is not part of plugin.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Copying a Calculated Field's value’ is closed to new replies.