Encode form params before passing to post