Hi, newbie here, I’ve done most of the lessons and scoured the documentation, but I just can’t work out how to get data to work. Any help much appreciated!
Here’s what I have worked out:
- How to get the user’s birthday from the date input field
- How to work out how many days old they are
- How to extract their birth date and birth month
But I’m really struggling with how I’d work out their zodiac sign. When I add the field “date range” to my Zodiac Data Type it’s blank i.e. doesn’t allow me add in a range. And even if it did, I wouldn’t actually want to specify a year because a user’s birthday could be any year rather than a specific one, if you follow me.
So is there some method to use their extracted birth date / month and look up a sign from the Zodiac Data table I’ve created? Or am I on completely the wrong track?
Yes, Ranges don’t have direct field entry in the data tab, you will need to knock up a quick admin page.
Rather than have a date range, I would suggest calculating the birthday days into the year (i.e. 1 is 1st Jan etc).
Then use the numeric Range field rather than the date. And have two depending on Leap year or not.
Ah…a numeric range! Good idea, I will try that.
But could you please elaborate on what you mean by creating an admin page? Why would I need to create one of those?
Thanks for your help!
Lots of data you might need to populate (either as static data for live, or for test) isn’t directly enterable in the data tab.
For example you can’t create lists, or, in this case, enter ranges directly.
So often we create throwaway pages for adding data that do all that instead. So two numeric inputs that populate the range in this case. Stick a dropdown at the top of the page to select the Zodiac sign (you can add the base data manually in the data tab) and then update on the admin page.
Excellent, fully understood, thanks for clarifying.
For those who maybe need that calculation, Couldn’t find it anywhere, so I’ve just made it here:
1 - 20 Capricorn
21 - 49 Aquarius
50 - 79 Pisces
80 - 110 Aries
111 - 140 Taurus
141 - 171 Gemini
172 - 203 Cancer
204 - 234 Leo
235 - 265 Virgo
266 - 295 Libra
296 - 325 Scorpio
326 - 355 Sagittarius
356 - 365 Capricorn