Adapt form to both post and put