• Resolved pjib

    (@pjib)


    Hi,

    I want to use the ‘Allow to type the values’ field on my slider but I’ve not been able to format it so far – so it doesn’t look very professional. I’d like to use thousands separators (‘) and a currency symbol. Is there a way to implement formatting (for the ‘Allow to type the values’ field)?

    Thank you.

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

    (@codepeople)

    Hello @pjib

    No, I’m sorry. In the current version of the plugin, the input boxes associated with the slider fields accept numbers only.

    You can emulate the behavior described in the current version of the plugin by inserting an “HTML Content” field in the form, with the following piece of code as its content:

    
    <script>
    jQuery(document).on('change', '[id*="_component_center"]', function () {
        var me = this;
        me.type = 'TEXT';
        me.removeAttribute('min');
        me.removeAttribute('max');
        me.removeAttribute('step');
        setTimeout(function () {
            var v = (new Number(me.value)).toLocaleString('en-US', {
                style: 'currency',
                currency: 'USD'
            });
    		console.log(v);
            me.value = v;
        }, 500);
    });
    </script>
    

    Best regards.

    Thread Starter pjib

    (@pjib)

    Thanks for the code.

    Is the requested functionality planned in a later version?

    Kind regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @pjib

    Yes, of course. All the suggestions are welcome, and yours is very interesting.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Slider ‘Allow to type the values’ field’ is closed to new replies.