vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Dynamics > vBa Dynamics v1.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2008, 08:20 PM
tfw2005 tfw2005 is offline
Senior Member
 
Join Date: Aug 2004
Posts: 352
Default Search Form Coding - Search in multiple fields at once

I need to create custom pages with search options, since my current is very large and hard to digest.

Basically, I have "part 1, part 2, part 3, part 4" - These are used when a given product has 4 of the same types of items, but in different colors.

However, for some items, part 1 will be black, and part 2 listed as red. In item 2, part 1 will be red, and part 2 will be listed as black.

So, Id like you to just be able to select "red" once, and then when you click submit, it searches custom fields 1-4, which are all "parts" entry areas.

Looking to do this on "search.php" type pages, forms and checkboxes and drop downs, etc.

Is something like this possible - notice the multiple cselectfields[fieldXXX][],.



<select name="cselectfields[field236][],cselectfields[field237][],cselectfields[field238][],cselectfields[field239][],cselectfields[field240][]," multiple="multiple" size="35" style="width:220px">
<option value="" selected="selected">Any</option>
<option value="Black">Black</option>
<option value="Blue">Blue</option>
<option value="Brown/Tan">Brown/Tan</option>
<option value="Green">Green</option>
<option value="Grey/Silver">Grey/Silver</option>
<option value="Orange">Orange</option>
<option value="Purple">Purple</option>
<option value="Red/Pink">Red/Pink</option>
<option value="White">White</option>
<option value="Yellow/Gold">Yellow/Gold</option>
<option value="Clear">Clear</option>
</select>
Reply With Quote
  #2  
Old 12-19-2008, 08:15 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

You should be able to use something like this if you don't need to also be able to search using other terms:

Code:
<input type="hidden" name="cfields[]" value="fieldX" />
<input type="hidden" name="cfields[]" value="fieldY" />
<input type="hidden" name="cfields[]" value="fieldZ" />

<select name="string">
....
Otherwise your next best bet is probably going to be to use a custom input name and then use a plugin or alter the search.php file so it can combine those fields with the 'cselectfields' values that would be set.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB 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
making a search string for multiple selection custom fields BWJ "How Do I..." Questions 4 10-13-2008 06:39 PM
Creating a Search form within a VBA module... stark "How Do I..." Questions 7 02-06-2008 07:33 AM
Search form for custom fields like this... pulsetoday "How Do I..." Questions 1 12-16-2004 10:18 AM
Navbar quick search form Roms Modifications 0 10-15-2004 01:40 PM
Quick Search form for whole Directory... pulsetoday "How Do I..." Questions 2 10-02-2004 12:16 PM


All times are GMT -4. The time now is 02:25 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.