Skip Navigation

[Resolved] Convert units

This thread is resolved. Here is a description of the problem and solution.

Problem:

Convert field values set in Centimeters to Inches.

Solution:

It is possible with little custom codes, for example

https://toolset.com/forums/topic/convert-units/#post-1187959

Relevant Documentation:

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by pedro.S 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1187461

Tell us what you are trying to do? Convert fields set in Centimeters to Inches

Is there any documentation that you are following? No

I'm trying to find a place to start, and can't seem to find one.
Basically what i want is that based on the WPML language set, to convert the field value to inches.

I know i don't need an online API for it because the converting value is always the same (not as currency, which is always changing).
1 Centimeter = 0.3937007874 Inch.

Do you happen to have something like this implemented previously? I've searched the forum and found nothing.

Thanks

#1187959

Hello,

There isn't such a built-in feature within Toolset plugins, but it is possible with little custom codes, for example you can create another shortcode to do the calculation, see similar thread here:
https://toolset.com/forums/topic/calculator/#post-24976

#1188046

Thanks Luo, that's a good point of start 🙂