arnoson / kirby-forms

Form builder and handler for Kirby 4
MIT License
10 stars 3 forks source link

Bugfix: If page doesn't exist (yet) return empty array #18

Closed ceesvanegmond closed 1 month ago

ceesvanegmond commented 1 month ago

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.

Screenshot 2024-10-09 at 12 29 27
arnoson commented 1 month ago

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: ...