I have a content type with a Node Reference field, so the user can select from a list of node titles. I need to filter out some nodes from the list (those that have a date field older than the current date).
I know that hook_form_alter() can be used to modify the display and validation of form fields, but probably not change the query that the field uses. So I think I need to write some kind of preprocess function for this field, that does a second filter on the contents?
Any pointers on how to do this would be great - thanks.