Fix form_url in develop

Forward port of #2078 and tests to develop