I am basically trying to create a Web App using Google Apps Script using an HTML interface that would allow a user to search a Google Sheet for names, dates, and keywords and have the matched rows display on the search site.
My sheet contains numerous rows, but I am only concerned with 3 rows in particular: the name, the date, and the keywords. I would like to be able to search for all of the rows in my sheet that match the name, the date, and a keyword.
So far, I've tried following --> How to have a Google Form retrieve spreadsheet data and display it on a Google Site? this link's instructions, however every time I hit submit it displays as null for the search results.
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<form method="get">
Responsible: <input type="text" id="responsible"/><br>
Date From: <input type="date" id="datefrom"/>
Date To: <input type="date" id="dateto"/><br>
Description: <input type="text" id="description"/><br>
<button onclick="gatherSearch()">Search</button>
<input type="reset" value="Reset">
</form>
</body>
</html>
Ideally, this is what the form would look like. I'd be able to either specify a name, a date, and a description (or a mix of a bunch) and it would return the rows that match my search.
Any help or pointers in the right direction would be greatly appreciated :)
EDIT
Below is my gatherSearch function, which gathers the text in the search bars from the HTML page and forwards it off to my .gs file to handle the searching.
function gatherSearch() {
var responsible = document.getElementById('responsible').value;
var datefrom = formatDate(document.getElementById('datefrom').value);
var dateto = formatDate(document.getElementById('dateto').value);
var description = document.getElementById('description').value;
google.script.run.basicSearch(responsible, datefrom, dateto, description);
}
}