Support » Plugin: Calculated Fields Form » How to get Dropdown value

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

    (@codepeople)

    Hello @jeffreytanuwidjaja

    The issue is simple, in javascript the comparison operator for equality is represented by the double symbol “==”, because the symbol “=” is used for the assignment. So, your equation could be implemented as follows:

    
    (function(){
    if(fieldname7==10) return fieldname1*10;
    if(fieldname7==20) return fieldname1*20;
    if(fieldname7==30) return fieldname1*30;
    })()
    

    However, if you pay attention to the equation, in this specific case, it can be implemented simply as:

    
    fieldname1*fieldname7
    

    Best regards.

    work great, thanks

    another thing, how to remove calculated border?
    i’m using this css, on chrome inspector is gone, but when i save and reload not gone
    input#fieldname8_1 input#fieldname1_1 input#fieldname12_1{border:0;}

    Plugin Author codepeople

    (@codepeople)

    Hello @jeffreytanuwidjaja

    There are some issues in your style definitions. In CSS if you want to apply the style definition to multiple selectors, separate them by comma symbols:

    
    input#fieldname8_1, input#fieldname1_1, input#fieldname12_1{border:0;}
    

    However, if you want hide the border of every calculated field in the form, would be simpler the following style definition:

    
    #fbuilder .cff-calculated-field input{border: 0 !important;}
    

    Best regards.

    what if i want to change the text color?
    input#fieldname12_1

    thanks for your reply btw @codepeople

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I always recommend to assign a class name to the field and define the new class, because this allow you apply the same appearance to multiple fields.

    For example, enter a custom class name through the “Add CSS Layout Keywords” attribute of fields you want to edit, for example: custom-text-color

    And then, enter the style definition through the “Customize Form Design” attribute of “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png)

    
    #fbuilder .custom-text-color input{color:red !important;}
    

    If you want change the color of field’s label:

    
    #fbuilder .custom-text-color label{color:red !important;}
    

    Best regards.

    could i set different label layout for each form, cause when i change from top to left align, all forms also change, i need only certain form change alignment.

    Plugin Author codepeople

    (@codepeople)

    Hello @jeffreytanuwidjaja

    I’m sorry, but I don’t understand your request. The label alignment configuration affects only to the form where it is applied. Please, send me the URL to the web page where the label alignment was defined in only one form but it is being applied to every form in the page.

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @jeffreytanuwidjaja

    The label alignment attribute affects to every field in the form. If you want change the alignment in only one field, you should assign a custom class name to the field, and then, apply to its label and .dfield tag, the css rules: float:left; and clear:none;

    For example, assuming the class name you have assigned to this field is: my-aligned-field

    The style definition would be similar to:

    
    #fbuilder .my-aligned-field label,
    #fbuilder .my-aligned-field .dfield{float:left !important; clear: none !important;}
    

    and maybe would be required to vary the widths of label and .dfield tags.

    I’m sorry, but I cannot customize the appearance of your form as part of the support service.

    Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to get Dropdown value’ is closed to new replies.