• Resolved chadtesting

    (@chadtesting)


    Curious about this, as I have some longer calculated field outputs that need to be included in my notification e-mail, and I would like to output them to a field, and I know HTML fields cannot work.

    Otherwise I will need to figure out how to return; multiple variables to the same calculated field and separate them by a page break.

    • This topic was modified 8 years, 1 month ago by chadtesting.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chadtesting

    (@chadtesting)

    Not a page break, paragraph break.

    Plugin Author codepeople

    (@codepeople)

    Hello,

    If you want to submit the result with a specific format, I recommend you create the text as part of the equation, but assign it to a hidden field, for example, if there is the hidden field: fieldname1, you can edit the equation similar to:

    (function(){
    var str;
    /** The code here assigns the value to the str variable **/
    jQuery('[id*="fieldname'+'1_"]').val(str);
    })()

    and that’s all.

    The fieldname1 field will be submitted to the server side with the formatted text (using HTML tags as part of the str variable)

    Best regards.

    Thread Starter chadtesting

    (@chadtesting)

    Ah brilliant, thanks. I just didn’t know if a hidden field could accept the value of the calculated field’s string. However, once I assign it to the hidden field, how would I format within the string?

    I suppose any formatting I do will need to be done in javascript?

    • This reply was modified 8 years, 1 month ago by chadtesting.
    Plugin Author codepeople

    (@codepeople)

    Hello,

    You should generate the value of the str variable with the tags, for example:

    (function(){
    var str = '<span style="color:red; font-weight:bold;">Hello World</span>';
    jQuery('[id*="fieldname'+'1_"]').val(str);
    })()

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is it possible to output the return; of a calculated field to a text box?’ is closed to new replies.