0

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!

0

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.

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.