php - How can I display search results on the same page as the search form element? -
i have element contains form:
<?php echo $this->form->create('prototypeitem', array( 'url' => array('instance' => $instance['prototypeinstance']['slug']) , 'class' => 'simple-search' , 'action' => '/search' )); echo $this->form->input('search', array( 'label' => 'search', 'type' => 'text' )); echo $this->form->end('search'); ?> <!-- code displaying search results here -->
previously, element called on page located @ site.com/realtor-documents/search, , worked fine.
however, designer has asked me move search form site.com/realtor-documents, eliminate click. form @ /realtor-documents now, when submit it, still redirects /realtor-documents/search. i'd results appear on same page form, /realtor-documents. how can that?
this because of 'action' => '/search'
, replace 'action' => ''
sends result on same page.
Comments
Post a Comment