gopherhockey
05-21-2009, 12:42 AM
How, in vBulletin, does one require an option value to be selected. With HTML forms you can just say "required" but I don't see this option available.
I have an option that is required in the newreply template. If they click to submit their message and the option value is empty I would like the post to not go through.
I don't want it to default to a value either. Its something the user has to select.
One way I found was to add something like this in the plugin code.. but is there a better way?
if (!$vbulletin->GPC['xconditions'] AND strlen($vbulletin->GPC['xconditions']) < 1)
{
$errors[] = 'No Condition Selected. Please select a condition below.';
}
I have an option that is required in the newreply template. If they click to submit their message and the option value is empty I would like the post to not go through.
I don't want it to default to a value either. Its something the user has to select.
One way I found was to add something like this in the plugin code.. but is there a better way?
if (!$vbulletin->GPC['xconditions'] AND strlen($vbulletin->GPC['xconditions']) < 1)
{
$errors[] = 'No Condition Selected. Please select a condition below.';
}