Dear all!
For a start up form I am using several list lookup fields. For some of them I set the options field 'required' to 'Yes'. In this case the first item in the source list is listed as default value. And this I want to avoid this.
Users should actively have to choose the right value. Is there a way to keep this field empty by default? As a way around I added a new item to the source list which will be listed as default. And by using the custom validation function I wanted to enforce changing this 'default' item. This item I called '0' and the ClientValidate code I defined looks like this: function ClientValidate(source, arguments) { if (arguments.Value % 2 == 0){ arguments.IsValid = false; } else { arguments.IsValid = true; } }
<script language="javascript">
function ClientValidate(source, arguments)
{
if (arguments.Value % 2 == 0){
arguments.IsValid = false;
} else {
arguments.IsValid = true;
}
}
</script>
How do I have to define this code to run the custom validation function correctly?
Is there any other way to keep this list lookup field empty and thus to use the standard function (Required = 'Yes')?
Thx.
Best regards,
Anton