i really can't play that
Javascript address autocomplete
Just to mark a solution, it's a reset the value and emit event:
const inputStreet = document.querySelector('input[id="data.street"]');
const inputCity = document.querySelector('input[id="data.city"]');
const inputZip = document.querySelector('input[id="data.zip"]');
inputStreet.value = street;
inputCity.value = city;
inputZip.value = zip;
inputStreet.dispatchEvent(new Event('input', { bubbles: true }));
inputCity.dispatchEvent(new Event('input', { bubbles: true }));
inputZip.dispatchEvent(new Event('input', { bubbles: true }));
8 replies
Multi-tenancy and createOptionForm on Select, Field 'company_id' doesn't have a default value
what about this?
protected function mutateFormDataBeforeCreate(array $data): array
{
$data['company_id'] = auth()->user()->company_id;
return $data;
}
14 replies
Javascript address autocomplete
I used it in another application, so Iam used to it and also it is updated daily from czech official addresses. I somehow overlooked your package, so i will give it a try, because this is pain and I address autocomplete is crucial. Thanks (y)
8 replies
Has anyone implemented Filamentv3 with tenancyfolaravel https://tenancyforlaravel.com/
Well, right now my multidatabase multinenancy is done by this method in Kernel.php
public function bootstrap()
{
$host = request()->getHost();
$subdomain = explode('.', $host)[0];
$envFile = '.env.' . $subdomain;
$envPath = base_path();
$envFilePath = $envPath . '/' . $envFile;
if (!file_exists($envFilePath)) {
abort(404, 'chyba');
}
app()->loadEnvironmentFrom($envFile);
parent::bootstrap();
}
But I would like to try the package.13 replies
Javascript address autocomplete
I tried to create a javascript listener which would update "value" attribute of corresponding field, but with no success:
document.querySelector('.smartform-instance-personal.smartform-street-and-number').addEventListener('input', function() {
var personalAddress = this.textContent; // nebo this.innerText
document.querySelector('.smartform-instance-personal.smartform-street-and-number').value(personalAddress);
});
8 replies