Home › Forums › WP ESTATE – Real Estate WordPress Theme FORUM › Change numeric fields to support decimals in WP ESTATE
This topic contains 1 reply, has 2 voices, and was last updated by patymorgh 2 years, 2 months ago.
Fields are set to intval type – which means they do not show decimals. We will review this for a future update. But meanwhile the solution is this
Replace intval with floatval in all the fields you wish to be this type.
Floatval adds decimals.
The files with default fields in estate are:
$value_custom = intval(sanitize_text_field( $_POST[$slug] ) );
In 2 places: ~ line 579 and ~line 953
Change in there intval to floatval
Around line 197 Change in that line intval to floatval
And how to support letter ? What should I write to replace the intval ?
You must be logged in to reply to this topic.