4

I've got entity forms installed, and I'd like to use some db_queries when a particular entity form is submitted, as to make use of the information filled out on that entity form.

Is this possible, and which hook should I use?

5

If I understand your question right, you should use the following hook to capture a submission:

hook_entityform_insert($entityform)

As described in the comments at the top of entityform.api.php:

* Entityform and Entityform type are standard entities using the Entity API module.
* The standard Entity hooks are availabe for them.
* Including
*  ...
*  hook_entityform_insert

Hope this helps

Addition:

here is the sample code I used:

function mymodule_entityform_insert($entityform){
  dsm($entityform);
}

and it did get triggered as soon as I submitted an EntityForm.

2
  • Hi David, I just tried this hook and it did work. I updated my answer above. Let me know if this still is not clear. – Stefanos Petrakis Feb 4 '16 at 2:02
  • the hook works for me. – Johann Combrink Nov 9 '16 at 8:26

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.