Jump to content
TNG Community

How to get Search to have death & spouse boxes checked by default


Holly Cochran

Recommended Posts

Holly Cochran

I would like my Advanced Search form to open with the 2 checkboxes "Show death/burial information" and "Show spouse " already checked by default. I can see that their variables, $showdeath & $showspouse, are initialized in searchform.php like this:

$showdeath = $_SESSION['tng_search_showdeath'];

$showspouse = $_SESSION['tng_search_showspouse'];

Positive values are apparently "yes". I tried to initialize the session variables by putting this in my custom_config.php file:

$_SESSION['tng_search_showdeath'] = "yes";

$_SESSION['tng_search_showspouse'] = "yes";

I also tried setting the value to TRUE. None of this caused the form to open with the boxes checked.

Does anybody know where these session variables are initially set? And is custom_config consulted for their values? I hate to change TNG core code due to the maintenance hassle, but I will if it's the only way to make this work. I have many people on my site with the same name, so the search results can be pretty useless without the spouse and death info to identify who's who.

thanks,

Holly

Link to comment
Share on other sites

Holly,

I think you want to change the TNG source code in the searchform.php file

at or near line 85 & 86

document.search.showdeath.checked = false;

document.search.showspouse.checked = false;

Hope that helps

Jay

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...