/    Sign up×
Community /Pin to ProfileBookmark

Form Select Option Based On Day Of Week Script

Hello all,

I am not a javascript developer and I think it is the solution to my need. I would like a form that is currently using a drop down to select the value be able to automatically put the proper value based upon the day of the week. For example, if it is Monday, then the select option should be “Today” and if it’s Tuesday, then the select option should be “Tomorrow”. Is this possible? Thank you!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@OverstatementJan 04.2007 — But today is Wednesday. If today is Tuesday, it certainly won't be "Tomorrow". I don't get what you're trying to do. If what is "Monday" or "Tuesday"? Another select menu? What's a select option's value? The selected option or the value shown when it's not droped down? Why would you make a select option if you only have 1 value ("Today" or "Tomorrow")? Maybe you want to do it the other way? Select "Today" and a seperate textbox would display "Wednesday", select "Tomorrow" and it would display "Thusday"?
Copy linkTweet thisAlerts:
@lputmanauthorJan 04.2007 — The form is for a menu ordering system. There are particular items only available on specific days of the week in addition to a la carte items. So if today is Monday, then the only option for Monday would be "Beans" and any a la carte items chosen. I don't want the viewer to have to actually select "Beans" if it is Monday, but only select the qty if they want any.

Currently, it is a standard form that the viewer must select "Beans" and then enter a qty.

I hope this makes sense.
×

Success!

Help @lputman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...