[6.x] Extract form submission logic into SubmitForm action
#14375
+483
−294
SubmitForm action
#14375