kdion4891 / laravel-livewire-forms

A dynamic, responsive Laravel Livewire form component with realtime validation, file uploads, array fields, and more.
243 stars 54 forks source link

Custom field types #24

Open zcwilt opened 3 years ago

zcwilt commented 3 years ago

struggling to see how I can add my own custom field type.

zcwilt commented 3 years ago

sorry, should say my use case is that I have some fields that are translatable using https://github.com/spatie/laravel-translatable

So for these I need to display multiple input fields based on the languages the app is set up to use.

While I realise that i could manually build using array fields, would be nice if I could just do

Field::make('Name')->translatable('name')->rules('required')