I haven't found anything after hours of looking here and other places about how anyone has accomplished this. Any help is greatly appreciated!

I've used the profileplus module to extend the search.module functionality to just handle profile searches. I've configured the user profiles to allow the users to select options from a dropdown box (location, etc).

I'm trying to configure the /search/profile page to allow me to put dropdown boxes (location, etc) into the search options. I'm having trouble getting this to work however. Has anyone had experience configuring the /search/profile page OR the search.module functionality to allow searchers to select from multiple dropdown boxes and then passing that value through to the normal search function?

As always, thanks for your help!

-Adam

Comments

Keeper54’s picture

Anyone had this problem before? (just brining it back to the top of the 'recent posts' area.

Keeper54’s picture

I'm getting rather desperate - what I'm looking for is a search module hack to allow multiple selections in an 'and' search. Anyone?

azoho’s picture

This is exactly what I'm looking for too.

I posted my question here, http://drupal.org/node/140626 , but not had any replies.

Basically, my html form is working with one selected checkbox but more than one ticked means the only the last one is searched for.

The issue is that the values for the same controlname in the form are being over-rided rather than being combined. And I lack any PHP or SQL understanding to see how I should correct it.

I went onto IRC with the support channel and got told to check out the FORMS API (http://drupal.org/node/37775), but that is essentially like coding a new module which isn't an option for a non coder for me.

I was also pointed in the direction of the WorkInProgress AJAX Form builder (http://drupal.org/project/formbuilder) which looks very good but still you need to know how to do the form in the first place so I couldn't get very far with it.

If you check out the example code on my original post you might know more than me about combining the values for a control name.

Feedback here if you get any progress as I'm desperate for this function too!

MTGirl’s picture

I'm also looking at this issue and am wondering how to do it. I'm a first time Drupal user, and lack understanding of Php and MySQL (something I'm working on, I'm just not there yet.)

I know this thread is recent, but has anyone figured out how to do this yet?

nishitdas’s picture

Bookmarked

azoho’s picture

From my research on this.

"The HTML specification allows two or more checkboxes to have the same name attribute. The idea is to group related choices where multiple values may be selected. Here's an example:

<form method="post">
I speak the following languages:
<input type="checkbox" name="lang" value="en">English<br />
<input type="checkbox" name="lang" value="fr">Français<br />
<input type="checkbox" name="lang" value="es">Español<br />
</form>

If this were processed as given, only the last checked value would be stored in the $_POST array. The solution is to add square brackets to the value of the name attribute, causing an array of values to be created.

<form method="post">
I speak the following languages:
<input type="checkbox" name="lang[ ]" value="en">English<br />
<input type="checkbox" name="lang[ ]" value="fr">Français<br />
<input type="checkbox" name="lang[ ]" value="es">Español<br />
</form>

You process such an array in the way shown above for multivalued menu options. "

So [ ] should group all the values together but for my search form (using trip search) the controlname is name="edit[require]" and so edit[require][ ] doesn't work, presumably because require is already an array?

I know nothing about php..
anyone have any solutions?

azoho’s picture

I offered some sponsorship and got the javascript text field input working.
See the post:
http://drupal.org/node/142323

Still waiting for a checkboxes solution, which is my prefered option.