1

I was wondering if we could apply custom classes (bootstrap) to the submit button in WFFM? I know that form inputs seem to have this ability, but I don't seem to see this feature for the submit button itself.

2
  • You can also achieve same by a small script in JS as $('form .scfSubmitButton').addClass("your class"); If you will update the class in extension then it will be same for all the forms but with JS you can handle it as per your form pages. – Yogesh Sharma Jan 30 '17 at 7:58
  • I'd prefer a solution more closely integrated with the CMS, with that solution, you would have to change the code each time you wanted to change the class on the button. Since WFFM is made for editing within the CMS, this really should stay within the CMS if possible. – Dylan Young Jan 30 '17 at 16:09
3

You can create a custom style and assign it to each form individually.

Create an item under /sitecore/system/Modules/Web Forms for Marketers/Settings/Meta data/Submit Button Type of template type /sitecore/templates/Web Forms for Marketers/Meta Data/Extended List Item and set the Value to your custom CSS class.

Custom Button Style

Then on the form itself, you can select the style in the Submit Button type field. You have to do this from the Content Editor, there is no option to set this from the Form Designer.

Select Style

The style on your submit button will be set as btn custom-style-value. The value from Submit Button size field is also applied in the same way, so it's possible to use that for styling also.

2
  • this method doesn't work for me. – Nicolas S.Xu Apr 21 '17 at 21:32
  • Which version of Sitecore/WFFM are you using? Are you using MVC? – jammykam Apr 24 '17 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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