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.
-
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
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.
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.
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.