works in <form> but not outside