Hi all,
I need to search my weblog entries for these values:
Name (input field) Company (input field) Industry (drop down) Competence (checkbox)
All these are custom fields.
I’m uing Mark Bowen’s plugin, but I can’t seem to make it work. For now I have only the Industry there:
{exp:search:simple_form weblog="membership_directory" search_in="everywhere" result_page="search-result"}
<select id="{exp:custom_drop_down:field_id field_name="industry"}" name="{exp:custom_drop_down:field_id field_name="industry"}">
{exp:custom_drop_down field_name="industry" initial_value_value="my-value" initial_value_option="Choose an industry..."}
<option value="{value}">{value}</option>
{/exp:custom_drop_down}
</select>
<input type="submit" value="submit" class="submit" />
{/exp:search:simple_form}
I get the error that no search term has been submitted. Can anyone help me out to make this work, please?
Kind regards, Michel
Hi Michel,
I could be wrong but I don’t think that the search forms allow you to add in your own custom fields to them. You can only use the code as shown in the documentation. That would explain why it’s not working. I would love to be proved wrong on this though as I’d love to do this myself personally 😉 so if anyone knows then do please tell!!
The only other way that I can think of getting it to do what you want would be to use the search term from the drop-down list in conjunction with the search://body=”“ parameter in a weblog tag as shown on this page here.
Hope that helps a bit and I do hope that I’m wrong on this as it would come in really handy for something I might need to do soon!! 😊
Best wishes,
Mark
ok, thx. That sounds bad ;-(. I’ll write the php code myself then. Strange though, this seems a normal feature for a cms, no? EE2? Michel
Yep please don’t quote me on what I said as I know there never used to be a way of doing it and I’m fairly certain that may well still be the case but you can definitely do the same sort of search by using the search parameter on a weblog tag if that helps at all.
I would love to be proved wrong on the first point though as I wouldn’t mind being able to do that myself 😉 Perhaps one of the dev team could pop in here and answer this for us though.
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.