User selects 1 record out of search results view...
I painstakingly built a search form with html view as follows:
- user enters whatever piece of data they have - such as partial phone number, zip code, business name, etc;
- view then retrieves a few fields from each matching record and displays them in a table (super ugly at the moment, but functional)
Now I want user to be able to select which of the matching results is the desired record - select that result - and go to a new html view or form displaying all of the data for that record.
How can I make the search results selectable, to pass them off as a parameter to another form?
Thanks for your help!
- htmlpage RefUSA_Data_Search_Results(search_query)
displayname = "RefUSA Data Search Results"
content
<%{%>
<%search_result = RefUSA_Data [((((((((Phone_Straight.contains(input.search_query) || Company_Name.contains(input.search_query)) || Executive_First_Name.contains(input.search_query)) || Executive_Last_Name.contains(input.search_query)) || Address.contains(input.search_query)) || City.contains(input.search_query)) || State.contains(input.search_query)) || ZIP_Code.contains(input.search_query)) || Website.contains(input.search_query))];%>
<table class="zc-viewtable"width="100%" border="1" valign="top">
<caption class="zc-viewtitle">Possible Matches</caption>
<tbody>
<tr>
<td valign="top">
<table class="zc-viewtable width="100"%>
<caption class="zc-viewtitle">Search Results</caption>
<tbody>
<tr class="zc-row-header">
<td class="zc-viewrowheader">Business</td>
<td class="zc-viewrowheader">First Name</td>
<td class="zc-viewrowheader">Last Name</td>
<td class="zc-viewrowheader">Phone</td>
<td class="zc-viewrowheader">Website</td>
<td class="zc-viewrowheader">Address</td>
<td class="zc-viewrowheader">City</td>
<td class="zc-viewrowheader">State</td>
<td class="zc-viewrowheader">Zip Code</td>
</tr>
<%for each data_row in search_result
{%>
<tr>
<td><%=data_row.Company_Name%></td>
<td><%=data_row.Executive_First_Name%></td>
<td><%=data_row.Executive_Last_Name%></td>
<td><%=data_row.Phone_Number_Combined%></td>
<td><%=data_row.Website%></td>
<td><%=data_row.Address%></td>
<td><%=data_row.City%></td>
<td><%=data_row.State%></td>
<td><%=data_row.ZIP_Code%></td>
</tr>
<%}%>
<%}%>