Custom search form using hooks?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
davebryan
Posts: 13
Joined: 2015-11-06 16:19

Custom search form using hooks?

Post by davebryan » 2015-11-06 16:25

Hey everyone,
I’m new (two weeks) to Appgini and love it so far. My app is a list of links to YouTube videos that I want an anonymous user to be able to search using two cascading keywords (a two level tree structure) and get a list of videos meeting the two keywords selected. No user editing, deleting or adding.

I have three tables – keyword_1, keyword_2 and video_list, with the two keyword tables configured as cascading dropdown lists. Ideally, when the user enters the website, he would see the two cascading dropdown search criteria with a list view below of the records that meet the criteria selected from the dropdowns.

I have been looking at hooks, and wonder if creating a custom search form would work. This has to be a very simple page that is intuitive to use. Any help would be appreciated.
Thanks,
Dave

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 356
Joined: 2013-03-21 04:37

Re: Custom search form using hooks?

Post by peebee » 2015-11-09 00:55


davebryan
Posts: 13
Joined: 2015-11-06 16:19

Re: Custom search form using hooks?

Post by davebryan » 2015-11-09 14:21

peebee,
Thanks, somehow I missed that one - need to investigate better.

davebryan
Posts: 13
Joined: 2015-11-06 16:19

Re: Custom search form using hooks?

Post by davebryan » 2015-11-24 05:12

OK, so I downloaded the Northwind demo to try and duplicate the "Creating Customized Search Forms" tutorial, but was not successful. I got a different set of code from the Permalink than is shown in the demo. When I run it, the hooks do not seem to be triggering because I always get the full search form instead of the custom search form.

My order_filter_custom.php file in the hooks folder is below. Note that I did not get the input type =submit value="Show Filtered Data"> code from the Permalink, so I added it.

<div style="margin: 0 auto; width: 400px;">
<b class="TableHeader">please enter the order ID</b>
<form method="POST" action="http://localhost/northwind_demo/orders_view.php">
    <input type="hidden" name="FilterAnd[1]" value="">
    <input type="hidden" name="FilterField[1]" value="1">
    <input type="hidden" name="FilterOperator[1]" value="equal-to">
    <input type="text" name="FilterValue[1]" value="">

<input type=submit value="Show Filtered Data">
</form>
</div>

and my activation code in order_details.php is

function order_details_init(&$options, $memberInfo, &$args){
// activate the customized search page
$options->FilterPage = dirname
(_FILE_).'/order_filter_custom.php';
return TRUE;
}

Any help would be greatly appreciated.
Thanks

Post Reply