Issue #8273 by cableman: Fixed errors in form generation