I'm currently trying to do the following: I have two input fields, like this:
<div class="form-group{{ $errors->has('plz') ? ' has-error' : '' }}">
<label for="plz" class="col-md-4 control-label">PLZ</label>
<div class="col-md-6">
<input id="plz" type="number" class="form-control" name="plz"
value="{{$plz}}" autofocus required>
</div>
</div>
<div class="form-group{{ $errors->has('city') ? ' has-error' : '' }}">
<label for="city" class="col-md-4 control-label">Stadt</label>
<div class="col-md-6">
<input required id="city" type="text" class="form-control" name="city"
value="{{$city}}">
</div>
</div>
So one for the postal-code and one for the city. What I want is, that when somebody enters a postal code, the city is automatically filled in (only need it for german cities). So for example somebody enters 70176 as postal code, then "stuttgart" should be automatically filled in. Propably we need AJAX for that? However I have no idea how to do it and where to get the data from.
Anybody can help me here?
PS: I'm using Laravel as PHP Framework if this might help