forms icon indicating copy to clipboard operation
forms copied to clipboard

Custom templates

Open Evanion opened this issue 9 years ago • 5 comments

This is the closest packages I have found for server side forms, compared to angular-formly is for angular apps, But I was wondering if there is any easy way to create custom markup templates for the package ..

It would allow me to configure the package to use a specific markup template for a project... since a project usually depends on a frontend framework like Bootstrap, foundation, or uikit.. It would be great if it was possible to just npm install this package, and a addon package for your frontend framework of choice, ad a option when bootrapping this package, and then just work with it as normal.

Evanion avatar May 02 '16 08:05 Evanion

You can construct your own widgets by following the same patterns the included widgets use.

ljharb avatar May 02 '16 18:05 ljharb

Something like forms.configure('bootstrap') would be nice as a way to use pre-configured templates for common frameworks.

iBelieve avatar Aug 05 '16 18:08 iBelieve

Which version of bootstrap? I wouldn't want to add the maintenance burden of having to update this module with every bootstrap version - and https://github.com/caolan/forms#bootstrap-compatible-output hopefully already documents how to get bootstrap to work.

ljharb avatar Aug 05 '16 20:08 ljharb

Something like forms.use(require('forms-bootstrap')) would enable this without the added maintenance of any single maintainer

voxpelli avatar Aug 06 '16 08:08 voxpelli

I second this. I come from Symfony, using the excellent built-in forms and validator, and they just use a template for the widgets you can fully replace with whatever you want, instead of programmatically rendering them. You can just include the barest template possible and let the community to build specific templates for each UI framework.

Danita avatar Dec 10 '19 11:12 Danita