Hi can someone help with a small issue, i have set the extra fields as a dropdown list and so that the first in the list isn't selected if they forget to chose one i have set the first field as "Please choose one of the following" but i dont want that to be used as a field either, so can someone help modify this
HTML Code:
if ($vbulletin->options['extra_threadfields_active'] == '1')
{
if (is_array($_POST['fields']))
{
foreach($_POST['fields'] AS $key => $fieldvalue)
{
// check if the field type has options
if (is_array($_POST['fields'][$key]))
{
foreach($_POST['fields'][$key] AS $index => $value)
{
$value = trim($value);
// Check For Required
if (empty($value)) { unset($_POST['fields'][$key][$index]); }
}
// set up the new $fieldvalue
$fieldvalue = implode(",", $_POST['fields'][$key]);
}
if ($_POST['required'][$key] == 'yes' && empty($fieldvalue))
{
$required = $_POST['requiredfield'][$key];
eval(standard_error(fetch_error('required_field_x_missing_or_invalid', $required)));
}
$dataman->validfields['field' . $key] = array(TYPE_NOHTML, REQ_NO);
$dataman->set('field' . $key, $fieldvalue);
}
}
}
to check if the field says "please choose one of the following" that they get sent back to choose one? i have also set up an error phrase 'field_not_chosen'