Add imports to form docs. Fixes #2012.