Set onsubmit form attr for automatic form submitting