• Resolved likipadhy

    (@likipadhy)


    display calculated value in the text instead of an input filed.

    The calculated results show in the input field. is it possible to change it and show only as text?

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

    (@codepeople)

    Hello @likipadhy

    My apologies for the delay in respond to your question, I have no received the notification about it.

    In your case, the calculated field would be used as auxiliary, to evaluate the equation, but the result can be displayed in a third field.

    I’ll try to describe the process with a hypothetical example.

    Assuming you have now a calculated field with the equation: fieldname1+fieldname2 but you want to display the result into another field:

    * Insert a “HTML Content” field in the form, with a div tag, span tag, or another HTML tag as its content, with an unique id, for example:

    <span id="result_here"></span>

    * Edit the equation as follows:

    
    (function(){
    var result = fieldname1+fieldname2;
    jQuery('#result_here').html(result);
    return result;
    })()
    

    * Finally, as the calculated field is being used as auxiliary, it is irrelevant to the form’s interface, so, I recommend you to tick the “Hide Field From Public Page” checkbox in its settings.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘display calculated value in the text instead of an input filed..’ is closed to new replies.