@impactdk/ngx-cms-formbuilder
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.4 • Public • Published

ngx-cms-formbuilder

This library is used to standardize form data sent from and to a CMS.

Supported CMS

CMS Support
Umbraco Forms Yes
Sitecore Forms Coming

Usage

  1. Import the module into your AppModule and configure it to point towards your CMS
imports: [
    CmsFormbuilderModule.forRoot(
        'https://url-to-umbraco/rest/v1/forms', // URL to CMS API
        'umbraco' // Type of CMS
    )
];
  1. Import the service to fetch the form
export class AppComponent implements OnInit {
    formData?: CmsForm;

    constructor(private formService: CmsFormService, private cd: ChangeDetectorRef) {}

    ngOnInit() {
        this.formService.getFormById('GUID').subscribe(data => {
            this.formData = data;
            this.cd.markForCheck();
        });
    }
}
  1. Lastly use the imported component to display the form (or roll your own using the form data)
<div *ngIf="formData"><cms-form-page [formData]="formData" [pageId]="currentPageId"></cms-form-page></div>

Notes for Umbraco

Currently we support almost all fields in Umbraco Forms and most workflows.

Field Support
Short answer Yes
Long answer Yes
Date Yes (make sure your template checks for null)
Checkbox Yes
File upload No
Password Yes
Multiple choice Yes
Data Consent Yes
Dropdown Yes
Single choice Yes
Title and description Yes
Hidden Yes
Recaptcha No
Recaptcha2 No

Readme

Keywords

none

Package Sidebar

Install

npm i @impactdk/ngx-cms-formbuilder

Weekly Downloads

5

Version

1.0.0-beta.4

License

none

Unpacked Size

563 kB

Total Files

47

Last publish

Collaborators

  • impact_lyk
  • matpeder
  • woodsboe
  • hartoeft
  • impactdkmac
  • tccimpact