FormEditor
FormEditor copied to clipboard
Edit values inside "BeforeAddToIndex" event
First of all, thank you for all the hard work and time spent on this project.
My question is similar to some already made here, but it is specifically related to the event BeforeAddToIndex.
Is there any way to change a value of a field before it is stored to db?
My example would be like:
`private void FormModelOnBeforeAddToIndex(FormModel sender, FormEditorCancelEventArgs formEditorCancelEventArgs) {
if (formEditorCancelEventArgs.Content.DocumentTypeAlias == "somepage")
{
var field = sender.AllValueFields().FirstOrDefault(f => f.Name == "checkerase");
if (field.SubmittedValue == "true")
{
// Edit another field
}
}
}`
Thanks