Does What it Says on the Box
-
Works well with the latest version of Gravity Forms and WordPress, does exactly what it says on the box.
My minor gripes/suggestions are:
- I’d like to be able to use more advanced number formatting. For example, right now if you choose to format as currency, you have to show two decimal points. Since our slider is going from $2,000 – $20,000 in increments of $500, this is a bit unfortunate.
- It’d be nice to apply some advanced formatting to the min/max values. I’d actually like our slider to display, “$20,000+” as the max value, but that doesn’t seem to be possible
All in all, a great plugin that adds a feature that really, for $200/yr, Gravity Forms should figure out how to develop themselves. Thanks to the plugin developer for making it for free.
—
EDIT: For anyone else looking to remove decimals in the currency formatting, here’s how I did it.
First, two disclaimers:
- I have absolutely no idea what I’m doing with Javascript
- This will doubtless be reset the moment you update the plugin to a new version
Change line 212 of the plugin’s gravity-slider-fields.php from:
wp_enqueue_script( 'gslider-fields', GSF_DIR_URL . 'slider.js', array( 'jquery', 'noUiSlider' ), GSF_VERSION );
to
wp_enqueue_script( 'gslider-fields', GSF_DIR_URL . 'slider.min.js', array( 'jquery', 'noUiSlider' ), GSF_VERSION );
Then change line 90 of the plugin’s slider.js from:
decimals: currency['decimals'],
to
decimals: 0,
Voila! You’ve got currency formatting without decimals. For now.
- The topic ‘Does What it Says on the Box’ is closed to new replies.