Server connect form generator: Support adding spinner to submit button

Server connect form generator: Support adding spinner to submit button automatically, including the relevant dmx-show attribute for the SC form state.executing and disabled attribute if state.executing

Can you clarify your request please? You can add a spinner to any button you like currently.

Oh, yes, I can clarify further. So, the current method you need to do it as per the documentation says, but over time this may get repetitive. So, I suggest the form generator automatically appends the spinner code including the dmx-show attribute

<button type="submit" class="btn btn-primary">
    Save <span class="spinner-border spinner-border-sm" role="status" dmx-show="state.executing"></span>
</button>

Without automation, you’d need to:

  1. Add spinner to button
  2. Add dmx-show to button and select the state.executing of the current server connect form
  3. (edit:) Add attribute to disable button if state.executing is true

It would be easier if you could pick the spinner you want, and the generator outputs the spinner <span> with dmx-show attribute as well

Basically increase productivity and reduce clicks

3 Likes

I do the same (a lot), with the added step to add an &nbsp; between the spinner and button text.

3 Likes

This has been implemented in Wappler 5.2.1, a spinner and disabled state is added on the submit button in the form generator.

1 Like