Editor, restrict input to numeric only.

Editor, restrict input to numeric only.

MickBMickB Posts: 103Questions: 25Answers: 2

Is there a way to do this?

I can't see but assume it is there somewhere.

Mick

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin
    Answer ✓

    The way to do this is to use the attr option of the text field type, which will let you set attributes, including the input type:

    {
      label: "My number input:",
      name: "num",
      attr: {
        type: "number"
      }
    }
    

    In that way you can use any of the HTML5 input types!

    Allan

  • MickBMickB Posts: 103Questions: 25Answers: 2

    Brilliant. I knew there would be a way.

This discussion has been closed.