Hello Couch Community, let's hope I can explain my hang-up properly.

I currently have three active page files in my root folder with boilerplate php on each:
1. index.php
2. listing.php (Page-view - cloneable template)
3. listingspage.php (List-view - in snippets folder)

My issue is as follows:

Ive created a search form on listingspage.php which is embedded in listing.php (as the list-view). When I search on listing.php(list-view) the functionality works perfect, however when i use the same searchbar on index.php, the search keywords are simply placed inside the seachform on the newly loaded list-view of listing.php and i have to click search on that form to have the results load.

My Question:
How can I have keywords submitted on the index page search form show results on the listing.php page without having to submit the form again on the second page?

Hope this makes sense,
I've posted my code for the search forms of both pages. Any help would be wonderful :)

Listingspage.php Search form:
Code: Select all
<div id="quick-search" style="margin:auto;">
                   <cms:form id="submitform" method="get" class="searchform" name="searchform" anchor='0' autocomplete="on">
                      <cms:if k_success >

                         <cms:if frm_city!='' >
                            <cms:set my_search_str="<cms:concat my_search_str ' | city==' frm_city />"  scope='global'/>
                         </cms:if>

                         <cms:if frm_state!='-' >
                            <cms:set my_search_str="<cms:concat my_search_str ' | state==' frm_state />"  scope='global'/>
                         </cms:if>
                      <cms:if frm_region!='-' >
                            <cms:set my_search_str="<cms:concat my_search_str ' | region==' frm_region />"  scope='global'/>
                         </cms:if>
                    </cms:if>
                    <div class='citysection filteroption'>
                         <label>City: </label>
                         <cms:input type="text"
                      value="Enter City Name"
                      onfocus="if (this.value=='Enter City Name') this.value='';
                      name="city" />
                      </div>
                    <div class='statesection filteroption'>
                         <label>State: </label>
                         <cms:input type="dropdown"
                               opt_values='Select State=- |Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virgina|Washington|West Virginia|Wisconsin|Wyoming'
                               opt_selected='-'
                               name="state" />
                      </div>
                    <div class='regionsection filteroption'>
                         <label>Region of State (optional): </label>
                         <cms:input type="dropdown"
                      opt_values=' Select Region=- | NW | NE | SW | SE'
                      opt_selected='None'
                      name="region" />
                      </div>

                    <div class="buttonset filteroption">
                         <cms:input type="submit" class="fbsubmitbtn" value="Search" name="submit" />
                      </div>

                  </cms:form>

                </div>


Listingspage.php (list-view) pages tag:
Code: Select all
<cms:pages paginate='1' limit='9' custom_field="<cms:show my_search_str />">
                      <div class="col-md-4 col-sm-6 col-xs-12 indvlistingtemplate">
                        <div class="col-md-12 col-sm-12" style="padding:0;"><img src="<cms:show listing_image />" class="listingspagepicture"></div>
                        <div class="col-md-12 col-sm-12 rightcollistingpanel">
                            <div>
                                <div class="page-header listinginfo">
                                    <h1 class="listinglisttitle"> <cms:show city />, <cms:show state /></h1></div>
                                <div>
                                    <p>Date Posted: <cms:date k_page_date format='M jS, 20y'/></p></div>
                                <div class="row">
                                    <div class="col-md-12 col-sm-12 col-xs-12" style="padding:0;">
                                        <p class="listingpagelocation">ID: <cms:show k_page_title /><p style="color:darkgray; padding:0;margin:0;"><cms:show county /></p>
                                       </div>
                                    <div class="row tempdetails">
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                    <div style="padding:0;" class="col-md-4 col-xs-4 listinginfowrap">
                                        <h1 class="text-left listinginfo"><img src="assets/img/opperatory.ico.png"></h1></div>
                                    <div class="col-md-6 col-xs-6 oppsviewwrap"><h1 class="oppsview"><cms:show listing_opps /></h1>
                                    </div>
                                      </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6 viewlstbtn"><span class="detailsbtn"><a class="detailslnk" href="<cms:show k_page_link />">View Listing</a></span></div>
                                </div>
                                </div>
                            </div>
                        </div>
                       </div>
                        <cms:if k_paginated_bottom >
                            <p class='clearfix'>
                                <cms:if k_paginate_link_next >
                                <a href='<cms:show k_paginate_link_next />' class='button float left'>&#62;</a>
                                </cms:if>
                                <cms:if k_paginate_link_prev >
                                <a href='<cms:show k_paginate_link_prev />' class='button float right'>&#60;</a>
                                </cms:if>
                            </p>
                        </cms:if>
                        <cms:no_results>
                        <h3>No matching orders found</h3>
                      </cms:no_results>
                      </cms:pages>


index.php search form:
Code: Select all
<cms:form method="get" class="searchform" name="searchform" action="<cms:show k_site_link/>listing.php" anchor='0'>
                  <cms:if k_success >

                    <cms:if frm_city>
                      <cms:set my_search_str="<cms:concat my_search_str ' | city==' frm_city />"  scope='global'/>
                    </cms:if>

                    <cms:if frm_state!='-' >
                      <cms:set my_search_str="<cms:concat my_search_str ' | state==' frm_state />"  scope='global'/>
                    </cms:if>

                  </cms:if>
                  <div class='citysection filteroption2'>
                    <!--<label>City: </label>-->
                    <cms:input type="text"
                    value="Enter City Name"
                    onfocus="if (this.value=='Enter City Name') this.value='';"
                    name="city" />
                  </div>
                  <div style="width: 200px;" class='filteroption2'>
                    <!--<label>State: </label>-->
                    <cms:input type="dropdown"
                        opt_values='Select State=- |Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virgina|Washington|West Virginia|Wisconsin|Wyoming'
                        opt_selected='-'
                        name="state" />
                  </div>
                  <div class="buttonset filteroption2">
                    <cms:input style="height:40px; width:100%;border-radius:10px; margin-top:10px;" type="submit" class="fbsubmitbtn" value="Search" name="submit" />
                  </div>

                </cms:form>