Custom Field Attributes

  • Posts: 259
  • Thank you received: 22
1 year 2 months 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: 83780
  • Thank you received: 13570
  • MODERATOR
1 year 2 months 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
1 year 2 months ago #359773

Perfect. Thank you

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

Time to create page: 0.059 seconds
Powered by Kunena Forum