Do you want to change the way Sitecore Forms generates ids or any attributes? Then follow through this short post.
Create a new class extending
Sitecore.Mvc.Pipelines.MvcPipelineProcessor with the type
Add the following code:
Changing the id can break the Forms functionality. That’s why we need to create a hidden field to work this around.
Create a new class named
CreateHiddenFields and add the following code:
Finally, add a config file patching to the forms.renderForm pipeline right after the processor
This way you can change how Sitecore Forms generates the id attribute.
Thanks Rodrigo for providing most of the sample code and finding about the breaking changes when you modify the form id.