reduxframework / redux-framework

Redux is a simple, truly extensible options framework for WordPress themes and plugins!
http://redux.io
Other
1.74k stars 583 forks source link

Number field #3944

Closed danielmari2 closed 1 year ago

danielmari2 commented 1 year ago

I think it's amazing redux-framework does not have a field for just a NUMBER.

I need a number with two decimals, like 10.98 or 10,98 . This is for doing a "Prices" section..

I know I can use the slider, but slider has a limit and I don't want to limit my users introducing their prices, imagine introducing a price for a coin that has a lot of numbers ($1 would be for example would be ¥110 and $100, ¥11000)..

I also know I can use the spinner, but the spinner doesn't allow decimals!

I can also use a text field but I don't want my users to be able to add text where there should only insert a number.

Also, I tried to validate the slider and spinner fields inside a repeater field to be not empty and it is NOT WORKING!

I just need an input like : <input type="number" step="0.01" /> Nothing more!

Please, can someone tell me how to achieve this or how to create this custom field? Please I need it

Thank you

kprovance commented 1 year ago

You're free to write an extension to add any functionality you want. You'll need to have more than a beginner's grasp on PHP and JavaScript, though. An example of an extension boilerplate is included with Redux in the sample folder.

https://devs.redux.io/guides/basics/using-extensions.html

Good luck.