check for form action directly

`ui` can be submit button as well