JSFiddle - React, Tailwind, and code Playground
by brigand
HTML
<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<title>Google Maps Query Application</title>
</head>
<body>
<div class="container">
<h1>Query Application</h1>
<form id="input" action="">
<div class="form-group row">
<label for="inputAddress" class="col-sm-2 col-form-label">Address</label>
<div class="col-sm-10">
<input type="search" class="form-control" id="inputAddress" placeholder="Address">
</div>
</div>
<div class="form-group row">
<label for="inputCity" class="col-sm-2 col-form-label">City</label>
<div class="col-sm-10">
<input type="search" class="form-control" id="inputCity" placeholder="City">
</div>
</div>
<div class="form-group row">
<label for="inputCountry" class="col-sm-2 col-form-label">Country</label>
<div class="col-sm-10">
<input type="search" class="form-control" id="inputCountry" placeholder="Country">
...
CSS
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col {
border: solid 1px #6c757d;
padding: 10px;
}
JavaScript
$(document).ready(function(){
$("#run").click( function(){
console.log("hey I'm here");
var formdata = $('form#input').serializeArray();
console.log(formdata);
$.each(formdata, function(i, field){
$("#results").append(field.name + ":" + field.value + "");
});
});
});