Try our conversational search powered by Generative AI!

Stylize form submit button.


I want to stylize button during the form submission, but in chrome UI is not updated until the form is not sent.

May 31, 2016 10:30

Hi Natallia, I cannot get your point about " stylize button during the form submission". Please elaborate so I can help you. Thank you.

  • Default FormElement look and feel is contained in the EPiServerForms.css (embbed in the DLL). You can turn it off (go to Forms.config, set injectFormOwnStylesheet="false")
  • You can tweak and reuse the default stylesheet by modifying the EPiServerForms.less, and recompile to .css as you wish.
Jun 13, 2016 8:48

Hi, everybody!

I believe that what Natallia is talking about is that there is a need to change a Submit button (after user clicks it) by adding an animation picture indicating that the submition data is being sent. 

The style of submit button is changed by 'formsStartSubmitting' handler, but since the data is sent with AJAX async false mode, Chrome is blocked until the ajax call is done. Thus, the animation is not visible.

THACH, I was wondering, if there is any workaround to overcome this? Is there any possibility that in some coming version of the Forms the ajax call would become asynchronous? 

Jun 13, 2016 10:39


I cannot assure 100%, we cannot ship it hastily, If you send me your example (code with formsStartSubmitting), I try to change it before we ship Forms 3.

For changing default behaviour (async: false), It will consider configuration value in epi.EPiServer.Forms object.

Jun 13, 2016 10:51

In $(document).ready  We call addActiveClass:

function addActiveClass() {
    if (typeof $$epiforms !== 'undefined') {
        $$epiforms(document).ready(function myfunction() {
            function () {
            function () {

the 'active' class adds a 'spinner' image to Submit button: {

background-image: url("../img/spinner.gif");



The image is rendered only in FireFox. Chrome is blocked and renders only after the ajax call completes.

Jun 13, 2016 11:14

I file Story AFORM-742 for it. It will be in Forms 3.0

In order to make Form use $.ajax() to submit form asynchronously, Developer can do either of this:

  • set JavaScript object epi.EPiServer.Forms.AsyncSubmit to true
  • decorate the <form> tag with attribute data-epiforms-async-submit="true"

Otherwise, form submits SubmissionData to serverside synchronously (to prevent Visitor continuously hit submit button (by accident))

Thank you for your suggestion.

Thach lockevn.

Jun 17, 2016 6:10

Thank you all for the help.

Jun 20, 2016 8:35
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.