Fix form url generation for named route.

Fixes #4492
Merge pull request #4494 from ADmad/3.0-formhelper

Fix form url generation for named route.