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 February 12th, 2013, 04:52 AM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default dropdown

Hi,

I have some dropdown menu's to make the search easier on the category page.
They are now below each other but I would like to have them on the same line.
How could I do that?

I have an example of my category page included.

Miranda
Attached Files
File Type: pdf dropdown.pdf (11.0 KB, 99 views)
  #2  
Old February 12th, 2013, 07:21 AM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

I have found a solution by adding style="width: 25%; float: left;" to the formtag.

I have another question about the filter form. Is it possible to keep the filter like a brand in the form during the search instead of going back to the first line?
  #3  
Old February 12th, 2013, 09:19 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by ponypraat View Post
Is it possible to keep the filter like a brand in the form during the search instead of going back to the first line?
I'm not sure what you mean. Can you explain further?

Thanks,
Eric
  #4  
Old February 12th, 2013, 02:39 PM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

I'll try to be more clear but I find it difficult to explain in English.

For example I chose in the dropdown the brand Royal Canin and click on it then all products of Royal Canin shows. But in the dropdown form the selected option don't show anymore, the text select a brand is showing, so you can't see what you have selected.

I hope it is more clear now.
  #5  
Old February 12th, 2013, 02:49 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I understand now.

You have code like this in your filter:

HTML Code:
<option value="[server.url type='fullpage' query='word=Anky']">Anky</option>
<option value="[server.url type='fullpage' query='word=Ariat']">Ariat</option>
<option value="[server.url type='fullpage' query='word=Atex']">Atex</option>
That should be changed to something like this:

HTML Code:
<option value="[server.url type='fullpage' query='word=Anky']" <?php if (@$_GET['word'] == 'Anky') { echo ' selected="selected"'; } ?>>Anky</option>
<option value="[server.url type='fullpage' query='word=Ariat']" <?php if (@$_GET['word'] == 'Ariat') { echo ' selected="selected"'; } ?>>Ariat</option>
<option value="[server.url type='fullpage' query='word=Atex']" <?php if (@$_GET['word'] == 'Atex') { echo ' selected="selected"'; } ?>>Atex</option>
Eric
  #6  
Old February 13th, 2013, 09:15 AM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

Yes, this works!

I also tried it for the price filter but that doesn't work, do I have to add something more?


<form name="jump2" style="width: 25%; float: left;">

<select name="myjumpbox" OnChange="location.href=jump2.myjumpbox.options[selectedIndex].value">
<option value="[server.url type='winkel']" selected>Zoeken op Prijs
<option value="[server.url type='fullpage' query='price=0-5']"<?php if (@$_GET['price'] == 'price=0-5') { echo ' selected="selected"'; } ?>>Onder 5 euro</option>
<option value="[server.url type='fullpage' query='price=6-10']"<?php if (@$_GET['price'] == '6-10 euro') { echo ' selected="selected"'; } ?>>6-10 euro</option>
<option value="[server.url type='fullpage' query='price=11-20']"<?php if (@$_GET['price'] == '11-20 euro') { echo ' selected="selected"'; } ?>>11-20 euro</option>
<option value="[server.url type='fullpage' query='price=21-30']"<?php if (@$_GET['price'] == '21-30 euro') { echo ' selected="selected"'; } ?>>21-30 euro</option>
<option value="[server.url type='fullpage' query='price=31-40']"<?php if (@$_GET['price'] == '31-40 euro') { echo ' selected="selected"'; } ?>>31-40 euro</option>
<option value="[server.url type='fullpage' query='price=41-50']"<?php if (@$_GET['price'] == '41-50 euro') { echo ' selected="selected"'; } ?>>41-50 euro</option>
<option value="[server.url type='fullpage' query='price=51-75']"<?php if (@$_GET['price'] == '51-75 euro') { echo ' selected="selected"'; } ?>>51-75 euro</option>
<option value="[server.url type='fullpage' query='price=76-100']"<?php if (@$_GET['price'] == '76-100 euro') { echo ' selected="selected"'; } ?>>76-100 euro</option>
<option value="[server.url type='fullpage' query='price=100-']"<?php if (@$_GET['price'] == 'Vanaf 101 euro') { echo ' selected="selected"'; } ?>>Vanaf 101 euro</option>

</select>
</form>
  #7  
Old February 13th, 2013, 09:19 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Instead of:
HTML Code:
<option value="[server.url type='fullpage' query='price=6-10']"<?php if (@$_GET['price'] == '6-10 euro') { echo ' selected="selected"'; } ?>>6-10 euro</option>
It should be:
HTML Code:
<option value="[server.url type='fullpage' query='price=6-10']"<?php if (@$_GET['price'] == '6-10') { echo ' selected="selected"'; } ?>>6-10 euro</option>
Eric
  #8  
Old February 13th, 2013, 09:28 AM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

Thank you!! It works great now!

I think I have to follow a php course.

Miranda
  #9  
Old February 15th, 2013, 08:45 PM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

Well my dropdown menus works very well, but how can I reset a selection ?

Is there a code for it?

Miranda
  #10  
Old February 15th, 2013, 09:05 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You can do something like this:

PHP Code:
<?php if (@$_GET['brand']) { ?>
    <a href="[server.url type='fullpage' query='-brand']">[X] Remove brand filter</a>
<?php ?>
Eric
  #11  
Old February 16th, 2013, 03:53 AM
ponypraat ponypraat is offline
 
Join Date: Nov 2012
Posts: 188
Default

Thank you very much!!!You make my day!

Miranda
 


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
Category specific Dropdown filters camseo Tips, Tricks & Tutorials 32 September 25th, 2012 09:21 AM
Category Menu dropdown works but cannot add non Datafeedr menus gutfeelboy Questions 2 August 15th, 2011 08:49 AM
Dropdown Filters Code feri Questions 4 March 6th, 2011 05:32 PM
Dropdown boxes behaving strangely on Chrome ayorofrance Problems 4 February 4th, 2011 07:50 PM


All times are GMT -5. The time now is 06:54 PM.


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