Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-01 23:58:56

frotzed
Member
From: Planet Earth
Registered: 2007-05-08
Posts: 20
Website

Is it possible to create a multiple input search form?

I really hope y’all can help me with this one. A good example of what I’m looking to accomplish can be seen here: http://4sranch.com/index.aspx

Specifically, look at the “Find Your Home” section on the right side. See how you enter multiple search criteria and then hit the “Find It!” button? Is something like that possible with Textpattern? If so, can someone point me toward a resource?

I’ve got a client who has close to 500 architectural blueprints with tons of categories such as square footage, style, price range, etc and he’d like a search form like this one.

If this cannot be accomplished with Textpattern then can someone point me toward a resource to accomplish this?

I know I’m asking a lot here, but I’d really appreciate the help.


Ben Gray | ben@openswitch.org | http://openswitch.org

Offline

#2 2008-04-02 00:05:33

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Is it possible to create a multiple input search form?


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#3 2008-04-02 00:56:34

frotzed
Member
From: Planet Earth
Registered: 2007-05-08
Posts: 20
Website

Re: Is it possible to create a multiple input search form?

Hmmm. This doesn’t seem to work with 4.0.6. It says “badly formed or empty plugin code.”


Ben Gray | ben@openswitch.org | http://openswitch.org

Offline

#4 2008-04-02 01:00:22

frotzed
Member
From: Planet Earth
Registered: 2007-05-08
Posts: 20
Website

Re: Is it possible to create a multiple input search form?

Nevermind, I had must have been doing something wrong.


Ben Gray | ben@openswitch.org | http://openswitch.org

Offline

#5 2008-04-02 01:29:34

frotzed
Member
From: Planet Earth
Registered: 2007-05-08
Posts: 20
Website

Re: Is it possible to create a multiple input search form?

Well, the plugin installed correctly, but I’m a bit lost as to how this thing works. I’d be able to figure it out if I could see the code in a working example. I tried just copying and pasting the example in the manual for the plugin (which I’ve read completely) but on my localhost development site I just get a blank screen, no search nothing. Any ideas?


Ben Gray | ben@openswitch.org | http://openswitch.org

Offline

#6 2008-04-02 02:57:04

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Is it possible to create a multiple input search form?

Are you in debugging mode? Does anything show up in the HTML? If you’re getting white-screened then, switch to testing and see what errors you get.

Offline

#7 2008-04-02 03:12:03

frotzed
Member
From: Planet Earth
Registered: 2007-05-08
Posts: 20
Website

Re: Is it possible to create a multiple input search form?

This is the tag I’ve got where the <txp:article /> tag should be on the search page.

<txp:ob1_advanced_search set="show_search_form"/>

I know there are other variables to put in but I’m just trying to figure out how this works.

This is the code I see in debugging mode:

<txp:ob1_advanced_search set="show_search_form"/>
	[SQL (0.000088): select name from txp_section where `name` = 'search' limit 1]
	[SQL (0.000099): select Form from txp_form where name='ob1_search_advanced_form']
	[SQL (0.000093): select Form from txp_form where name='ob1_search_advanced_header']
	[SQL (0.000092): select Form from txp_form where name='ob1_search_form']
	[SQL (0.000092): select Form from txp_form where name='search_results']
	[ob1_advanced_search initialize: Ok]
	[ob1_advanced_search set: 'show_search_form' to '': Ok]
[ ~~~ secondpass ~~~ ]
 -->

Honestly, I have no idea what any of that means.


Ben Gray | ben@openswitch.org | http://openswitch.org

Offline

#8 2008-04-02 07:40:50

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Is it possible to create a multiple input search form?

Did you go through the setup steps in the manual?

There it says:

On the newly created page for the search section, remove the article tag currently in it and replace it with:
<txp:ob1_advanced_search/>
Note: Whatever you do, don’t load the page just yet!

Quick start

If you want the fast approach of to the plugin just add the attribute setup="1" to the already added tag, load the page and it will install the standard indexes, section, pages, forms and CSS.

The standard install makes title, body, excerpt and the custom field one and two searchable in occurrences. After this is done and nothing big has exploded on the screen telling you something has gone bonkers, revert the tag to it’s first state without the setup="1" attribute and reload and voila, a search form has appeared.

Maybe that’s the reason. I’d make a backup of your db before you install it as it modifies the db and may no longer be compatible with the most recent version.

Another option may be to use glz_custom_fields, which may be necessary anyway if you have a lot of custom fields and categories to deal with. You have to buy it but it is worth it, particularly in combination with sed_section_fields.

Last edited by jakob (2008-04-02 07:43:20)


TXP Builders – finely-crafted code, design and txp

Offline

#9 2008-08-29 02:34:25

fbox
Member
From: Melbourne
Registered: 2006-02-18
Posts: 42

Re: Is it possible to create a multiple input search form?

Hi Frotzed,

How did you go with your problem? I’ve got ob1_advanced_search working on 4.0.6 fine, but am in need of much the same solution – ability to restrict the search query using additional inputs (ie state, article category, etc). See my post here

I’d be very interested in hearing what you ended up doing!

- fbox

Offline

Board footer

Powered by FluxBB