フォームを送信してレコードを保存する前に、電子メール アドレスで既存のレコードを確認したいと考えています。私はいくつかの調査を行い、RecordService.RecordSubmitted イベントを使用することを最も提案しましたが、Form.Core.Services を確認すると、RecordService が表示されませんでした。
そのイベントにフックする別の方法はありますか。
Umbraco 7.4.3 とフォーム 4.3.2 を使用しています。
フォームを送信してレコードを保存する前に、電子メール アドレスで既存のレコードを確認したいと考えています。私はいくつかの調査を行い、RecordService.RecordSubmitted イベントを使用することを最も提案しましたが、Form.Core.Services を確認すると、RecordService が表示されませんでした。
そのイベントにフックする別の方法はありますか。
Umbraco 7.4.3 とフォーム 4.3.2 を使用しています。
You have a few options. One is to use one of the record storage events. these are contained in the following namespace:
Umbraco.Forms.Data.Storage.RecordStorage
The following events are available:
I'm not 100% sure if you can delete the record in the RecordInserting event, as it may not be in the DB at that point, I've not actually tried.
The other option would be to write a custom workflow that runs once the record is inserted that looks for duplicates and deletes the record if it's a duplicate. there is some documentation for this on the Umbraco Community site.
Finally, you could create some custom validation that searches for existing records with that email address and wire it in using JQuery or similar, and just not submit the form if the validation fails.