Skip to content
Browse files

onsubmit-js

  • Loading branch information...
1 parent ac8d84d commit e9efa2b53c89241ae5d44768fd276908529dfefe @vii committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/webapp/actions.lisp
View
6 src/webapp/actions.lisp
@@ -59,6 +59,7 @@
(list* name default keys))))
lambda-list)
,@body)))
+ onsubmit-js
(async t)
(sync-fallback t)
after-submit-js)
@@ -89,8 +90,9 @@
,input))
(t input))))))))
`(<form
- ,@(when async
- `(:onsubmit (js-attrib (return (let ((async-submit-success (async-submit-form this))) ,@after-submit-js async-submit-success)))))
+ ,@(when (or async onsubmit-js)
+ `(:onsubmit
+ ,(or onsubmit-js `(js-attrib (return (let ((async-submit-success (async-submit-form this))) ,@after-submit-js async-submit-success))))))
:method :post
,@(when sync-fallback
`(:action ,action-link))

0 comments on commit e9efa2b

Please sign in to comment.
Something went wrong with that request. Please try again.