• Resolved hheyhey568

    (@hheyhey568)


    Hello, Thanks for all the support provided.

    I am in a situation where I want to change the field label of number field based on selection of dropdown.

    For Example: Fieldname1 is dropdown, with choices: Head ,Cylinder & Sphere.
    Fieldname2 field label should change to “Depth” when “Head” is selected in fieldname1 and “Length” when ‘Cylinder” is selected in Fieldname1.

    Thanks..

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

    (@codepeople)

    Hello @hheyhey568

    You may insert different number fields and configure them as dependent of corresponding choices in the DropDown field (https://cff.dwbooster.com/blog/2020/03/01/dependencies/)

    If you want to use only one field and modify its label by programming, you should to use a calculated field as auxiliary (you can hide the calculated field simply ticking a checkbox in its settings), with the following equation:

    
    (function(){
        var l = getField(2).jQueryRef().find('label');
        if(fieldname1 == 'Head') l.text('Depth');
        else l.text('Length');
    })()
    

    Best regards.

    Thread Starter hheyhey568

    (@hheyhey568)

    Thanks a lot

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Field Label with Logic or Dropdown’ is closed to new replies.