• Resolved Tilo

    (@netsales)


    Hello,

    Is there a way to implement double track?
    Slider and input field. If i change the slider, it would change the value of the input field and the other way around.
    The Background is that the slider mobile does not work well.

    Thanks
    Tilo

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @netsales

    If the sliders are not working very well on mobiles, go to the settings page of the plugin, select the “Classic (Recommended)” option for the attribute: “Script load method”, and then, press the “Update” button.

    Concerning to create a relationship between an input field and an slider. Assuming the number field is the fieldname1, and the slider field the fieldname2 (the fields’ names are assigned dynamically, so, you should use the names of the fields in your form), a possibility would be insert a “HTML Content” field in the form with the following piece of code as its content:

    
    <script>
    (function($){
    $(document).on('keyup', '[id*="fieldname1_"]', function(){
    $.fbuilder.forms['_1'].getItem(2).setVal(this.value);
    });
    $(document).on('change', '[id*="fieldname2_"]', function(){
    $.fbuilder.forms['_1'].getItem(1).setVal(this.value);
    });
    })(fbuilderjQuery);
    </script>
    

    Best regards.

    Thread Starter Tilo

    (@netsales)

    Hello,

    Thanks for your fast resopnse.

    just i tested the script, but i think the Elegant DIVI Theme makes no output for HTML Code.
    between “Berechnen Sie Ihre monatliche Kreditrate in Euro.” and “Angaben”

    I use the Equation
    PREC(CALCULATEPAYMENT(fieldname10,fieldname12,fieldname13),2)
    Just i need only one fieldname?! fieldname1 ore fieldname2. Is it correct?

    Is there a solution?

    Plugin Author codepeople

    (@codepeople)

    Hello @netsales

    The “HTML Content” field should not be inserted into the page, I’m talking about a control in the form. Please, look the “HTML Content” control in the controls bar at left.

    Concerning to the equation, the answer is affirmative. If you have a created a relationship between the fields (slider and number), you should use only one of them in the equations (I recommend you to use the number field).

    Best regards

    Thread Starter Tilo

    (@netsales)

    Hello codepeople,

    yes i know and i do it.

    You can see it here (white block, but no response)
    https://experten-kredite.de/kreditrechner/#kreditrate

    <div class="fields  fieldname20_1 cff-html-field column3" id="field_1-6" style="clear: left;"><div id="fieldname20_1" class="dfield"><script>
    (function($){
    $(document).on('keyup', '[id*="fieldname1_"]', function(){
    $.fbuilder.forms['_1'].getItem(2).setVal(this.value);
    });
    $(document).on('change', '[id*="fieldname2_"]', function(){
    $.fbuilder.forms['_1'].getItem(1).setVal(this.value);
    });
    })(fbuilderjQuery);
    </script></div><div class="clearer"></div></div>
    
    Plugin Author codepeople

    (@codepeople)

    Hello @netsales

    Remember you should to replace the fields names with the corresponding ones on your form, if your fields are: number field – fieldname123 and slider field – fieldname456 (both hypothetical), the block of code would be:

    
    <script>
    (function($){
    $(document).on('keyup', '[id*="fieldname123_"]', function(){
    $.fbuilder.forms['_1'].getItem(456).setVal(this.value);
    });
    $(document).on('change', '[id*="fieldname456_"]', function(){
    $.fbuilder.forms['_1'].getItem(123).setVal(this.value);
    });
    })(fbuilderjQuery);
    </script>
    

    Best regards.

    Thread Starter Tilo

    (@netsales)

    Hello codepeople,

    you are the best…thank you ;o)

    Now it works fine.
    He makes i little bit mistake with the value “effektiver Jahreszins” at the start, but it works.

    https://experten-kredite.de/kreditrechner/#kreditrate

    Thaks a lot
    Tilo

    Plugin Author codepeople

    (@codepeople)

    Hello @netsales

    It has been a pleasure.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Double Input’ is closed to new replies.