Custom Field Attributes

  • Posts: 249
  • Thank you received: 21
1 month 2 weeks 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: 81563
  • Thank you received: 13071
  • MODERATOR
1 month 2 weeks 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: 249
  • Thank you received: 21
1 month 2 weeks ago #359773

Perfect. Thank you

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

Time to create page: 0.051 seconds
Powered by Kunena Forum