Perform the following steps for displaying search results:
For displaying the search results, we will need to create a new form which will display the search textbox and render the search results right below the search form. The form will be placed in
SearchController
underCommunicationApp/module/Users/src/Users/Controller/SearchController.php
.Create a new view which will be used for displaying the query window and also rendering search results. This will be placed under
CommunicationApp/module/Users/view/users/search/index.phtml
.<h3>Document Search</h3> <?php // Search Form echo $this->form()->openTag($form); foreach ($form as $element) { echo $this->formElement($element); echo $this->formElementErrors($element); } echo $this->form()->closeTag(); // Search Results if (count($searchResults)) { ?> <h5>Results</h5> <table style="width: 600px; border:1px solid #f5f5f5;"> <...