After following the dynamic filters tutorial, I successfully created a search form. The pagination is not working properly. When clicking to go to another page the search form criteria disappears. I found one other post in the forms that describes this problem (from 2009), but no solution. I am sure I am missing some little thing, but I cannot figure it out! I am using my search form with form tags enabled as identified in the tutorial. I am using version 2R3 with Joonla 1.5.22.
Thank you!
HEADER
Body
Footer:
Thank you!
HEADER
<?php
// get the number of records returned
$db =& JFactory::getDBO();
global $count;
$count = $db->loadResult();
// get the previous filter strings
$search_surname = JRequest::getString('SURNAME', '', 'post');
$search_firstname = JRequest::getString('FIRST_NAME', '', 'post');
$search_maidenname = JRequest::getString('MAIDEN_NAME', '', 'post');
$search_burialloation = JRequest::getString('BURIAL_LOCATION', '', 'post');
?>
<!-- display the filter box and buttons -->
<table width="400" border="1" cellspacing="0" cellpadding="4">
<tr>
<th align="right" scope="row">Surname</th>
<td><input type="text" name="SURNAME" id="search_lastname" value='<?php echo $search_surname; ?>'/></td>
</tr>
<tr>
<th align="right" scope="row">First Name</th>
<td><input type="text" name="FIRST_NAME" id="search_firstname" value='<?php echo $search_firstname; ?>'/></td>
</tr>
<tr>
<th align="right" scope="row">Maiden Name</th>
<td><input type="text" name="MAIDEN_NAME" id="search_maidenname" value='<?php echo $search_maidenname; ?>'/></td>
</tr>
<tr>
<th align="right" scope="row">Burial Location</th>
<td><input type="text" name="BURIAL_LOCATION" id="search_buriallocation" value='<?php echo $search_buriallocation; ?>'/></td>
</tr>
<tr>
<th align="right" scope="row"> </th>
<td><input type="submit" name="filter" id="filter" value="Submit" /> <input type='reset' name='reset' id='reset' value='Reset' /></td>
</tr>
</table>
<hr />
<!-- Start the List -->
<h3>Obituary List</h3>
<table width="550" border="1" cellspacing="0" cellpadding="4">
<?php
global $count;
if ( !$count ) {
echo "<div>Sorry, no results were found.</div>";
}
else {
?>
<?php
}
?>
Body
<tr>
<td colspan="5" bgcolor="#37223b"><strong><span style="color:#FFFFFF;">{SURNAME}, {FIRST_NAME} {MIDDLE_NAME}</span></strong></td>
</tr>
<tr>
<td width="142"> </td>
<td align="right">Maiden Name:</td>
<td>{MAIDEN_NAME}</td>
<td align="right">Spouse:</td>
<td>{SPOUSE}</td>
</tr>
<tr>
<td> </td>
<td align="right">Birth Date:</td>
<td>{DATE_OF_BIRTH}</td>
<td align="right">Veteran:</td>
<td>{VETERAN}</td>
</tr>
<tr>
<td> </td>
<td align="right">Date of Death:</td>
<td>{DATE_OF_DEATH}</td>
<td align="right">Burial Location:</td>
<td>{BURIAL_LOCATION}</td>
</tr>
<tr>
<td> </td>
<td align="right">Obituary Date:</td>
<td>{OBITUARY}</td>
<td align="right">Burial Date:</td>
<td>{DATE_OF_BURIAL}</td>
</tr>
<tr>
<td> </td>
<td align="right">Obituary Source:</td>
<td>{OBITUARY_SOURCE}</td>
<td align="right">Photo:</td>
<td>{PHOTOGRAPH}</td>
</tr>
<tr>
<td> </td>
<td align="right">Death Notice:</td>
<td>{DEATH_NOTICE_SOURCE}</td>
<td align="right">Notice Date:</td>
<td>{DEATH_NOTICE}</td>
</tr>
<tr>
<td> </td>
<td align="right">Survivors:</td>
<td colspan="3">{SURVIVORS}</td>
</tr>
<tr>
<td> </td>
<td align="right">Notes:</td>
<td colspan="3">{NOTES}</td>
</tr>
<tr>
<td> </td>
<td align="right">See:</td>
<td colspan="3">{SEE}</td>
</tr>
<tr>
<td> </td>
<td align="right">See Also:</td>
<td colspan="3">{SEE_ALSO}</td>
</tr>
Footer:
</table>
<?php
global $count;
if ( !$count ) {
echo "Try searching on just part of a name or location.";
}
else {
?>
{pagination}
<?php
}
?>