Refactored form template logic into new formBuilderTemplate class