Viewing 3 reply threads
  • Author
    Posts
    • #6926
      Anonymous
      Inactive

      Hi,

      I have a price field that I would like to save as a number rather than a string so i can sort by value properly. How do I save a field as a number data type?

    • #6933
      Steve
      Keymaster

      @hartey11– Piklist supports are HTML5 fields, including number:

        piklist('field', array(
          'type' => 'number'
          ,'field' => 'my_number'
          ,'label' => 'Enter a number'
        ));
      
    • #6935
      Anonymous
      Inactive

      Thanks Steve, I’ve currently got it as a number type but when I var_dump() the result it returns the value as a string?

    • #6936
      Steve
      Keymaster

      That’s odd. When I use that field, pull the value and use in an equation it works for me.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.