How can I override an entity form with the same date? I have an entity form that requires choosing from a date field.
I wanted to override a submitted entity form if there is an existing submitted form with the same date.
I was looking for a solution in the net, but I was not able to find anything useful.
Thank you in advance for those who can help!
When new entity created you need to implement check (if entity with certain date exists) in your FORM_ID_submit() function. If so, use entity_load() to edit existing entity, if not, create new one. Also I recommend using EntityFieldQuery and Entity Metadata Wrappers to deal with entities.