Forums

Only show current month from dropdown menu

flyboeing 02 Dec, 2010
Hello all,

Currently I am working on a member section of my website, including a photo upload form (finished) and an other form so members can sent us there best photo, for the 'Photo of the month' contest.

Now I am making an upload form, including a dropdown list with every month in it. Members can upload there photo from the first day of the month, until the 25th day. From day 26 till the end of the month, people can vote on the best photo. Now I have a dropdown list with every month, but I would like to display only the current month.

How can this been done?

Kind regards,
Ruud
GreyHead 02 Dec, 2010
Hi ruud,

Can you post some code to show exactly what you are doing?

You can get the curent month using the PHP date() function but there are many ways to format and use it.

Bob
flyboeing 03 Dec, 2010
Hi Bob,

I don't have any code yet. I am just working out my idea.

My idea is to make a form so people can upload there photo for "Photo of the month" contest. This is partly the reason why I want a dropdown menu where you can select only the current month. The other part of this is that I only want to make this form available between the first day of the month (01 December for example) till the 25th day of the month (December 25 for example). If someone tries to upload a photo on december 26th, the form shouldn't be available.
GreyHead 03 Dec, 2010
Hi ruud,

You can control all of that from PHP.

The Watchman plug-in can also turn a form on and off on a given date.

Bob
flyboeing 03 Dec, 2010
Hi Bob,

After replying on your first message I found the Watchman plug-in๐Ÿ˜› I took a look at it, but you can only set a date for 1 month. I would like it to have it every month. So if I use the Watchman plug-in, every month I have to set the date.
GreyHead 03 Dec, 2010
Hi flyboeing,

True, so you need to code it in PHP instead.

Bob
flyboeing 03 Dec, 2010
Thanks. I will try to do that. If it don't work, I will use the Watchman plug-in :wink:
This topic is locked and no more replies can be posted.