I am providing an education site. I need certain lessons to appear on certain days, based on when the user created a membership. so, on day 1 of the membership, Lesson 1 will appear in a link to a Lesson page. day 2 will appear Lesson 2 link to a lesson page. I’m trying to figure out how to approach this and am struggling. Any ideas? thank you
You have 2 collections:
- Memeber/PrivateMembersData which is a “built-in” collection.
- “Lessons” collection which contains “title” and “day”.
Now when a user logs in, you query the PrivateMembersData and gets the _createdDate filed.
Then you get the current date using JS Date() method. you construct the current date - _createdDate.
Now you know which day it is, and you check if it fits to the “day” field in the “Lessons” collection.
So, there will be a DB table listing the Lessons, hyperlink value and a day value. Then when a member logs in, the text hyperlink property will be set to the related Day that corresponds to the Day value in the Table…is this on the right track? Thank you
@michaelallgier yes, and to do that, you’ll have to write the code to compare the current date minus the registration date to the lesson date and to hide or show the links in accordance.
@jonatandor35 ok, sounds good. one other thing, how do you change the textbox font fore color in code?
@michaelallgier You’ll need to use the html property.
https://www.wix.com/corvid/reference/$w.Text.html#html
I put an example (a little bit more complicated than you were looking for) here:
https://jonatandor35.wixsite.com/test/textshadow (the one on the right, but with opacity = 1)