Home › Forums › General Issues › Field Types and Default Values
I’m creating two specific field types within a tab group. Email and Number to represent user email and a phone number. In trying to set a default email address, it keeps requiring a number input. And in setting a default value for the number field, each time I publish it, the default number is changed to: 2147483647. Am I missing some settings necessary to set default values for these fields?
Hi @rbtstudio
Any chance you are using the same field name across multiple fields?
Can you take a screenshot showing both fields (in edit field group screen) open?
Thansk
E
It was a good question which caused me to do a double take, but alas, the field names are unique. The field titles are the same, but that shouldn’t matter right? Here’s the screen shot you requested.
Hi @rbtstudio
Thank you for the screenshot. Yes, for some reason, the email field is using an incorrect field type for the default value option…
I have just fixed this bug and pushed to github.
Are you able to download and use the latest github version?
Also, may I ask what version are you currently using? Stable / Nightly?
Thanks
E
That new nightly push did in fact fix my email default value bug. Thank you so much for that! I was wondering if you had seen that the Number default value is still causing a problem. I would enter a desired value and once published, the value is changed to a different number. I’m attaching another screenshot for you to see.
On a whim, I searched the number and not so surprisingly it came back with this:
wikipedia.org/wiki/2147483647
Has anyone else run into this problem in a Number Field Type? The Default Value changing to 2147483647 after publishing?
The topic ‘Field Types and Default Values’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.