I have a form set up for visitors to enquire about events occurring during the current year.
The events are selected from a dropdown select menu, populated by a ***Field.class.php file that I've added.
It works fine, but I'm wondering if there is a way for events to only be included in the select menu if the current date is before a given date.
Is this something that could be done in Formbuilder's Advanced Settings for the field using Smarty or PHP conditionals?
Formbuilder: exclude select menu items after given date
Re: Formbuilder: exclude select menu items after given date
Oh well. Given my PHP skills, it'll have to be done with javascript 

-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Formbuilder: exclude select menu items after given date
if you wrote the field for formbuilder to popuplate the list it'd probably be simpler to modify the list at that time to exclude events in the past.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Formbuilder: exclude select menu items after given date
Thanks for your reply, Calguy.
The form has previously been updated annually: replacing the previous years events with those for the upcoming. Listing expired events may be confusing for end users, so the requirement is to remove them as they expire, without manual editing of the list.
The form was a last minute addition a couple of years back, and the site will probably be switched to more sophisticated events management in future. I have the javascript ready to roll and it'll improve the site for the majority of visitors, but a server-side solution would obviously have been preferable.
The form has previously been updated annually: replacing the previous years events with those for the upcoming. Listing expired events may be confusing for end users, so the requirement is to remove them as they expire, without manual editing of the list.
The form was a last minute addition a couple of years back, and the site will probably be switched to more sophisticated events management in future. I have the javascript ready to roll and it'll improve the site for the majority of visitors, but a server-side solution would obviously have been preferable.