Dynamic forms are meant to easen the development of custom forms in Lightning, they allow an easy and fast setup using the Lightning Web Components' framework. You will be able to:
- Create forms for Custom and Standard Objects
- Have custom forms ready to use in any page type within Lightning.
<targets>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
</targets>
Before starting make sure Lightning is enabled in your org.
Get the repository
git clone https://github.com/nereagit/generic-forms
Deploy the components in your org, for this you should be authenticated with your target org.
sfdx auth:web:login --setdefaultdevhubusername --setalias my-hub-org
sfdx force:source:deploy --manifest "<project-forder-path>/generic-forms/manifest/package.xml"
The components have the following parameters to setup the components' forms.
Field | Description |
---|---|
dynamicObject | API name of Salesforce object (can be custom or standard) |
fieldList | List of fields' API names separated by commas |
headerLabel | (Optional) Header title for the component |
formIcon | (Optional) Icon placed next to the header title, should be part of the Lightning Design System |
Note: All the fields are required by default but it can changed in the component's json file > connectedCallback > required.
Want to contribute? Great! Reach out to me or open a pull request in the project, any contribution is welcome!