If you have to use a drop-down list, you can put validation on the field, to allow only values from the value list - but then you'll probably also want some user-friendly error trapping too (rather than FM's horrible "Revert field?" message). But the user can still type in the field, so you might prefer to have a script trigger to prevent that.
Might a pop-up menu would be a better option?
You could try the option of auto-enter this calculation:
ValueCount ( FilterValues ( Self ; ValueListItems ( Get ( FileName ) ; "YourValueListNameInQuotes" ) ) ) ; Self
If the user enters something that is not in the list of values , the field will wipe out itself .
You can still override a pop-up menu.
I agree that using field validation is probably the best method for restricting data entry to the values in a value list, since it works regardless of context. You can override the default error message in the Validation dialog.
If you really want to prevent the user from typing anything into the field at all, then a scripted interface and a pick list (either a separate list view window or a popover with a portal) would be a better option. Take the control completely away from the user and don't even put the field on the layout at all. (You can use Set Field script steps to place the correct values there after the user makes his selection.)
The choices in the Inspector are Drop Down List and Pop-up Menu.
You are using the editable Drop Down List.
Change the choice to Pop-up Menu and you will not be able to edit the selections from your value list. No calculations or anything else needed.
You can still select multiple options by Shift-selecting. While technically not typing something other than what's in the list, it's likely not what you want, either.
Try to paste something...
Again, it depends on what your objective is. If you want to prevent the user directly typing or pasting into the field, no, they can't do that. But if you want to make sure they select one (and only one) value from the list, a pop-up menu will not stop it.
You can shift-select multiple values in a pop-up menu. See attached file and try it yourself.
popUpTest.fmp12.zip 65.3 K