Custom Field Attributes

  • Posts: 256
  • Thank you received: 21
8 months 1 week ago #359729

I'm struggling with custom field attributes. I have a custom field "Item" and field type = Text. I want to restrict the input to whole numbers with no decimal places. I can specify in the attributes type="number" but this allows decimals. type="integer" doesn't work. What should I be entering here?

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
8 months 1 week ago #359733

Hi,

You want to make the custom field required and fill the "regular expression" option with something like this:

^\d+$

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 21
8 months 1 week ago #359773

Perfect. Thank you

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum