0

I have a lookup-field that needs to have a value, although under some circumstances there is no options. In these cases, the user should not be able to create a new list-item.

Problem is that when the lookup field does not have any available options, the form seem to disregard from the fact that is has no value and the item gets created with an empty value in the field anyway.

Is there a simple idiomatic way to force the field to actually have a valid value?

I'm working as programmer, defining stuff in xml and code. No designer-stuff.

1

You might try implementing the PreSaveAction function client side.

function PreSaveAction() {   
   //If (lookup field has no options){ return false; }
   //else {return true;}
}
1
  • Oups, weekend happend. I'll get back to this on monday :)
    – Alex
    Oct 14 '16 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.