Expose form generation in template