I have been working on updating an old nova package (custom field) that does google maps and google places autocomplete.
I have managed to work out how the custom field goes together, but I'm a bit lost on how to save more than one input box to the model on save.
this is the package: https://github.com/michael-presentcompany/nova-map-address
As you can see I have followed the instructions, but im a bit lost on how to save multiple fields.
fill(formData) {
formData.append(this.field.attribute, this.value || '');
formData.append(this.field.latitude, this.field.lat || '');
formData.append(this.field.longitude, this.field.lng || '');
},
In this case, I want to save the address to one field on the model, and then i want to save lat and long to the model as well. I would like to save them as seperate fields, as this will help me alot with the use case.
I have been following the instructions from here: https://nova.laravel.com/docs/3.0/customization/fields.html#form-fields
Can someone point me in the right direction?? am i missing something simple?