Trying to turn a field into height (5'9")

I am trying to find a way to turn a number field into a height (5’9") field. Is this at all possible?

Hi Nancy,

To achieve this, first add a Single Line Text field. The number field won’t allow me to use the following jQuery code. Then add the “numbertofeet” custom CSS class to the field as shown in the screenshot below.

Use the following code in your child theme’s JS file or the “Simple Custom CSS and JS” plugin.

Now, you’ll see that when you stop typing, the number will be converted to the height value, as in the screen recording below.

Screen recording

Give it a try, and let me know how that goes! :smile:

Thanks
Faisal

This is exactly what I need. By chance, do you have a copy of the code? I am one character off somewhere when typing it in.

I apologize for forgetting to share the code with you. You can copy the code from the GitHub repository below. Thank you.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.