Hello,
On a custom FormSaveProvider I'm trying to save a generated value on the form table. I've created the form field and using the parameter "form" or the parameter "keysAndValues" seems not working.
public override bool Save(FormSetting form, Dictionary<string, object> keysAndValues) { string discountVoucher = GenerateDiscountVoucher(); form.Fields.FirstOrDefault(p => p.SystemName == "DMForms_RegistoMaquina_DiscountVoucher").Value = discountVoucher; form.Fields.FirstOrDefault(p => p.SystemName == "DMForms_RegistoMaquina_DiscountVoucher").Save(); form.Save(); }
If I use direct access to the database on the FormSaveProvider the changes are stored on the database but are not visible on the confirmation template.
I thought to create an OnGlobalTags subscriber but that way I cannot use that value for the Email sender FormSaveProvider or others.
How can I change values during the FormSaveProvider and make it available as tag for the confirmation page and emails sent?
Thanks,
Diogo Lino