auto form generation from templates