• Resolved Francis

    (@emolotel)


    Hello
    can I have a string in a calculated field?

    Example:

    (Function () {
    var first = fieldname4, second = fieldname5;
    if (AND (first == 1, second == 1)) return NOT POSSIBLE;
    }) ()

    • This topic was modified 5 years, 11 months ago by Francis.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @emolotel

    Yes of course, but in javascript the textual values must be enclosed between single or double quotes, furthermore, javascript is a case sensitive language, and the correct would be “function” and not “Function”. So, the equation should be edited as follows:

    
    (function () {
    var first = fieldname4, second = fieldname5;
    if (AND (first == 1, second == 1)) return 'NOT POSSIBLE';
    }) ()
    

    Best regards.

    Thread Starter Francis

    (@emolotel)

    how can i change font and color?

    Plugin Author codepeople

    (@codepeople)

    Hello @emolotel

    The fonts and colors (or any other design modification) are defined with CSS (the new styles should be redefined through the “Customize Form Design” attribute in the “Form Settings” tab: https://cff.dwbooster.com/images/documentation/form-settings-tab.png), and the styles to define depends on the elements you want to edit.

    For example, assuming you want to edite the appearance of the calculated fields, you can enter the following style definition into the “Customize Form Design” attribute:

    
    #fbuilder .cff-calculated-field input{
    font-family: Arial, Helvetica, sans-serif !important;
    color: red !important;
    }
    

    Of course, using the CSS rules and values you want.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘calculated field with STRING’ is closed to new replies.