Skip to content

Edit values inside "BeforeAddToIndex" event #210

Description

@manylson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions