Currently the plugin fails if there's no form yet (see attachment).
This fix checks if there an page to begin with (on page creation in the dialog).
Since kirbyForms()->formFields() only accepts an page and not null.
Good catch! Thanks for fixing
A small note: can you use conventional commits when you contribute (I auto-generate the release messages with this)? In case of a fix it would be lowercase fix: ...
Currently the plugin fails if there's no form yet (see attachment). This fix checks if there an page to begin with (on page creation in the dialog). Since
kirbyForms()->formFields()
only accepts an page and not null.If not; just return an empty array.