1

I want to add a custom attribute to Sitecore form submit button like custom-attribute="@value".

Here is an example I found which shows how to add for other fields, but the same I cannot replicate for submit button: Creating custom data attribute for Sitecore form fields

Which View file to be changed? where to do the change in core dB to add custom attribute in submit button?

2 Answers 2

1
  1. You can find a view in this location C:\inetpub\wwwroot\XXX\Views\FormBuilder\FieldTemplates and this view you can add in your code:

enter image description here

  • Below are the changes for core db as mentioned in link:
 - Switch to Core db and go to this location /sitecore/client/Applications/FormsBuilder/Components/Layouts/PropertyGridForm/PageSettings/Common/Styling
 - Create duplication item of CssClass and rename it with CustomAttribute
 - Update FormLabel to Custom Attribute
 - Add BindingConfiguration to customAttribute
1
  1. Which view has to be changed?

    [YOUR_WEBSITE]\Views\FormBuilder\FieldTemplates\Button.cshtml

  2. where to do the change in core dB to add custom attribute in submit button?

    You can find it here: /sitecore/client/Applications/FormsBuilder/Components/Layouts/PropertyGridForm/PageSettings/Settings/Button

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.