Submitting a form without reloading the view - how much JS work?


#1

Hi there,

I would like to implement some “auto-save” of a form: When an input field is left (on blur), I would like to submit the form.

Of course, this can be done with Agile UI now ($input->on('blur', $form->js()->form('submit'));) but: Whenever the form is submitted, the view of the form is reloaded. This is definitely annoying when trying to work with that :slight_smile:

So, what I would like to do is to submit the form “silently”, without reloading the view. An easy way to do this? Simply adding a parameter would be THE way :slight_smile:

Best regards
Philipp


#2

Hi there,

I will post a proper description of what I want this evening, maybe its just passing a param to semantic UIs .api function.


#3

Hi,

what I want is more Semantic UI related than Agile UI: I want to stop the .api function to set the class “loading” to the form when the form is submitted. Thats all :slight_smile:


#4

As I wanted the “loading” class somewhere else (not on the whole form but on a button, the semantic ui option “stateContext” did the job perfectly: using this I could easily move the loading indicator somewhere else.