I am using this hook channel_form_entry_form_tagdata_start to process some data before it is saved to database.

But there are many cases where I want to cancel. Validation errors, missing field, etc.

What is the correct way to this inside a hook event handler?

Am I even using the correct hook?


I used this technique before. Is this still the correct way to do it?


You can use the previous technique having same method call but the hook will be different channel_form_submit_entry_start instead of safecracker_submit_entry_start

Please note: if you are updating the hook name within the extension, it would be easy and good to uninstall it first and then update the hook name. Again install it.

I hope, everything would work fine for you.

  • It is a curious case that I have. It seems that the technique that we used only stops the submission and creation of safecracker registration channels. But it does not stop the creation of a member. Oct 7 '13 at 8:23
  • I think, you are using "Safecracker Registration" module. Not sure, why this module not respecting this hook. Also, it seems that "Safecracker Registration" doesn't have any extension hook. Oct 7 '13 at 9:08
  • Those Safecracker hooks are suppose to be inherited and not break in 2.7. I am going to be re-releasing this module under the name "Channel Registration". I need to get rid of the "Safecracker" ties. That's the reason it hasn't been updated, it because it required a fairly significant rewrite. It works 100% on my end, just doesn't use those new Channel Form hooks yet. Oct 7 '13 at 21:04
  • @JustinKimbrell Safecracker Registration is not inserting the channel data if there are some problems like validation errors. That is correct behavior. The problem that I have is that the member data is inserted regardless of errors. This does not necessarily mean that it is Safecracker Registration's fault. It might be EE. That is why I asked. Oct 8 '13 at 1:31
  • Interesting. I have not seen that on my end. The error handling and member registration works 100% on my end, so this might be a specific EE 2.7 issue. Oct 8 '13 at 13:13

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.