John Cashin
posted this on February 06, 2009 09:35
If you need for a dropdown list to be required one solution is to create an eocfield that has a display attribute of none and is marked required, then add the following javascript to populate the required field with the text from the list. The drop down list should start with a blank entry (hold down alt and type in 255 on the keypad) as the default so that it will not pass the requirement by default. The dropdown for this example is "County"
You also need to include onchange="filltext()" as an attribute for your dropdown list.
<script type="text/javascript">
function filltext()
{
document.forms[0].text1.value=(document.forms[0].county.options[document.forms[0].county.options.selectedIndex].text);
}
</script>