aerni / statamic-livewire-forms

Supercharge your Statamic forms with Livewire
https://statamic.com/addons/aerni/livewire-forms
Other
28 stars 2 forks source link

Improve field property handling #20

Closed aerni closed 2 years ago

aerni commented 2 years ago

This PR makes field properties dynamic. Instead of getting and setting field properties on a config array, we now call each property's method on demand. This is helpful if you change a field in the hydratedFields callback.

For example: If you change the options of a select field, the default value will now take those new options into account. Before this change, you had to manually change the default value to reflect the changes made to the options.

This PR also ensures the captcha response isn't saved to the form submission and adds/fixes some other small things.