Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 26th, 2014, 08:41 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default search bar help

Hey Eric. We're on a roll so far tonight!

Remember the search bar code you helped fix a little while ago for http://saveongolf.net?

Here's some "issues" I'm having with how it's acting. Don't know if there is anything that can be done or not. But here's what I'd like it to do that it's not doing now.

1. keep the word being searched for in the search box after results are loaded and/or use breadcrumbs for results (I have no idea where the "Search Results for:" are coming from on the results page. I have to assume that is in WP and I'll have to get it out of there if I can find it?

2. The orange search button doesn't do anything when rolled over. Can I make it highlight or something so you know you hit it?

3. Don't know if this is on just my computer or not, but it is trying to auto-fill when you type something in. Which is ok but you have to hit search once to get rid of the drop down box of past searches then hit it again to start search. It can be confusing.

any or all of those would be awesome.

Thanks for all of your help. here's the current code.

<div class="header-search">

<div class="textwidget"><form role="search" method="get" id="searchform" class="search-form" action="/store/search/">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input class="search-field" type="text" value="" name="name" id="s">
<input class="search-submit" type="submit" id="searchsubmit" value="Search"><input name="saleprice" value="1-" type="checkbox"><strong style="color:#fff;margin-top: 5px; display: inline-table;
float: right; margin-left: 5px;">On sale</strong>
</div></form>
</div>


FYI, your change didn't cause the above to happen. it was like this before. I had to get it to work first before I worried about appearance!

Last edited by yankeestonk : September 26th, 2014 at 08:42 PM. Reason: fYI
  #2  
Old September 27th, 2014, 09:01 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

1. To keep the search term in the search box after a search, change this:
HTML Code:
<input class="search-field" type="text" value="" name="name" id="s">
To this:
HTML Code:
<input class="search-field" type="text" value="" name="name" id="s" value="<?php echo esc_attr( @$_GET['name'] ); ?>">
2. Yes, that's possible but it's really beyond the scope of support we can provide.

3. Here's how to prevent autofilling of an HTML input text box: http://stackoverflow.com/a/2531

Eric
  #3  
Old September 27th, 2014, 09:56 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Did #1 and it didn't do anything. Here's what the new code looks like.

<form role="search" method="get" id="searchform" class="search-form" action="/store/search/">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input class="search-field" type="text" value="" name="name" id="s" value="<?php echo esc_attr( @$_GET['name'] ); ?>">
<input class="search-submit" type="submit" id="searchsubmit" value="Search"><input name="saleprice" value="1-" type="checkbox"><strong style="color:#fff;margin-top: 5px; display: inline-table;
float: right; margin-left: 5px;">On sale</strong>
</div></form>
  #4  
Old September 27th, 2014, 10:18 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

The changes you made were either to the wrong file or in the wrong place. I viewed your source and the attribute "value" does not appear in your code.

Eric
  #5  
Old September 27th, 2014, 10:24 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I see the issue...

Change this:

HTML Code:
<input class="search-field" type="text" value="" name="name" id="s" value="<?php echo esc_attr( @$_GET['name'] ); ?>">
To this:

HTML Code:
<input class="search-field" type="text" name="name" id="s" value="<?php echo esc_attr( @$_GET['name'] ); ?>">
Eric
  #6  
Old September 27th, 2014, 12:15 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

you're having a rough day Eric! I put in the new code and the code itself shows up in the white search area. So I changed it back.
  #7  
Old September 27th, 2014, 12:20 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

The code is in WP. See attached pic.
Attached Thumbnails
Click image for larger version

Name:	wordpresssearch.JPG
Views:	149
Size:	136.3 KB
ID:	780  
  #8  
Old September 27th, 2014, 01:12 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I don't think you can put PHP in a widget like that.

Eric
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I have two search boxes which search different categories? atlantistarget Questions 3 September 6th, 2013 11:56 AM
New Trick: Combine Datafeedr product search with Wordpress posts search dhilditch Tips, Tricks & Tutorials 5 April 18th, 2013 05:58 AM
Change theme search box to DF search iankil Questions 1 February 12th, 2013 05:47 PM
Search for Product Name in Advance Search Widget shopecx Questions 2 November 29th, 2012 03:12 PM


All times are GMT -5. The time now is 12:49 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.