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

    (@codepeople)

    Hi,

    If you are talking about to display texts in the calculated fields to show the equations results like you describe, you should modify a little the plugin code, because the calculated fields have been implemented to display the results of mathematical equations:

    1. Open the “/wp-content/plugins/calculated-fields-form/js/modules/01_mathematical_logical/public/module_public.js”, in the text editor your choice.

    2. Go to the snippet of code:

    return isFinite( v ) || /\d{2}[\/\-\.]\d{2}[\/\-\.]\d{4}/.test( v );

    and modify it like follow:

    return (typeof v != ‘undefined’);

    Now, the equation can return a text like to:

    “Your result for the fieldname10 year is:….”

    Best regards.

    Thread Starter dammert89

    (@dammert89)

    Thanks. and if I want the fieldname to show up as the label for another field? Like replacing “Choose your info for <%fieldname10%>” to show “Choose your info for 2015”. But in the label/description area

    Plugin Author codepeople

    (@codepeople)

    Hi,

    By default you cannot use a field’s value in the label of another, but if you have javascript or jQuery knowledges, you will be able to replace a label when the field value varies.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘fieldname in label or description’ is closed to new replies.