Select Page

How to have a range field in Formidable with no effort. Example

Please select a valid form
Read more in the next link
http://wordpress-31734-68612-213147.cloudwaysapps.com/formidable-range-slider-field-howto/
This is the code of this form.

jQuery(document).ready(function () {
   var rangesElements = jQuery("div.range").find("input");
   jQuery.each(rangesElements, function () {
      var prefix = "$";
      var thousandSeparator = ",";
      var range = jQuery(this);
      var rangeParent = range.parent();
      var elementId = range.attr("id");
      elementId = elementId.replace("field_", "");
      range.attr("type", "hidden");
      rangeParent.append("<input id='range_" + elementId + "' type='range' value='0' min='-10000000' max='50000000' step='1000'>");
      rangeParent.append("<div class='range_result_" + elementId + '></div>');
      rangeParent.find('#range_' + elementId).on('input', function () {
         range.val(jQuery(this).val());
         rangeParent.find('.range_result_' + elementId).text(prefix + ' ' + jQuery(this).val().replace(/(d)(?=(ddd)+(?!d))/g, "$1" + thousandSeparator));
      });
   });
});