Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit values inside "BeforeAddToIndex" event #210

Open
manylson opened this issue Jul 23, 2019 · 0 comments
Open

Edit values inside "BeforeAddToIndex" event #210

manylson opened this issue Jul 23, 2019 · 0 comments

Comments

@manylson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant