# Conditionally Convert Numbers to String

**URL:** <https://community.gravityforms.com/t/conditionally-convert-numbers-to-string/16852>\
**Category:** Get Help\
**Tags:** custom, slider, conditional-logic\
**Created:** [February 13, 2024, 4:38am UTC](https://community.gravityforms.com/t/conditionally-convert-numbers-to-string/16852 "2024-02-13T04:38:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLichtenwalner](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/blichtenwalner/32/332_2.png) [@BLichtenwalner](https://community.gravityforms.com/u/BLichtenwalner)\
**Post date:** [February 13, 2024, 4:38am UTC](https://community.gravityforms.com/t/conditionally-convert-numbers-to-string/16852/1 "2024-02-13T04:38:58Z")

</div>

What would be the best approach for this challenge?

**CHALLENGE:** Create an assessment form, based on slider fields, that have virtually endless number ranges. See [test form here](https://virtualleadershipprograms.com/test/). Then, based on the final numeric value from each field, select a letter. Combine all the letters into a final value.

**EXAMPLE:**

- If Slider 1 Value \<= 3, Set first letter in final field string = “h” (lowercase h)
- If Slider 1 Value \<= 5, Set first letter in final field string = “H” (Capital H)
- If Slider 1 Value \<= 7, Set first letter in final field string = “c” (lowercase c)
- Else, Set first letter in final field string = “C” (capital C)
- If Slider 2 Value \<= 3, Set SECOND letter in final field string = “e” (lowercase e)
- If Slider 2 Value \<= 5, Set second letter in final field string = “E” (Capital E)
- If Slider 2 Value \<= 7, Set second letter in final field string = “d” (lowercase d)
- Else, Set SECOND letter in final field string = “D” (capital D)
- If Slider 3 Value \<= 3, Set THIRD letter in final field string = “e” (lowercase e)
- If Slider 3 Value \<= 5, Set third letter in final field string = “E” (Capital E)
- If Slider 3 Value \<= 7, Set third letter in final field string = “i” (lowercase i)
- Else, Set THIRD letter in final field string = “I” (capital I)

So, depending on the slider values, a text string input field could be HeE, CdI, or something like that.

**POSSIBLE SOLUTIONS**  
**1. Hooks** seem most appropriate, but I’m an old programmer sludging my way through this and cannot seem to get it to work. If this is best, your recommendation on structure or best tutorial is appreciated.  
**2. Multiple Forms w/ Conditional Logic** seem likely an option. I’ve done this before with limited values, but I think this would get really ugly with the wide range of possible numbers.  
**3. Something Else?** Is there something obvious I am overlooking or any better way?

I really want to avoid yet another plugin and/or extra fees. Any recommendations or guidance is appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [March 14, 2024, 4:39am UTC](https://community.gravityforms.com/t/conditionally-convert-numbers-to-string/16852/2 "2024-03-14T04:39:04Z")

</div>

Closed on March 14, 2024, 4:39am UTC

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