Custom Field Attributes

  • Posts: 259
  • Thank you received: 22
9 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: 83022
  • Thank you received: 13403
  • MODERATOR
9 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: 259
  • Thank you received: 22
9 months 1 week ago #359773

Perfect. Thank you

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

Time to create page: 0.062 seconds
Powered by Kunena Forum