prevent double submit and handle error on item and category forms