Advanced search form that mirrors CMSB sections

7 posts by 2 authors in: Forums > CMS Builder
Last Post: May 4, 2011   (RSS)

By NigelGordijk - April 27, 2011 - edited: April 27, 2011

I have a CMSB section set up that uses a series of menus and check-box lists for the client to add content to their site. I'd like to set up an advanced search form that is automatically laid out using the same lists and menus as the cms. I've attached the relevant screen shots of CMSB and the page template that the form will appear on, which looks like this: http://thecoachesloft.com/plants.php.

Is there a way to automatically duplicate the fields, lists and menus from CMSB into the advanced search form, please?

This is what it looks like on their old site: http://www.colourparadise.com/searchcat.php.

Thanks!
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Attachments:

cmsb.jpg 152K

cmsb0.jpg 140K

plants_001.php 7K

Re: [NigelGordijk] Advanced search form that mirrors CMSB sections

By robin - April 28, 2011

Hi Nigel,

CMS Builder does not have a search form generator yet. If you just need the menus and checkboxes for your form you could view the page source and copy them.

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Advanced search form that mirrors CMSB sections

By NigelGordijk - May 1, 2011

So I can get an advanced search to work if a hand-code it, rather than auto-generate it? If so, I've copied, pasted and styled the code from CMSB so it looks like the rest of my site - http://thecoachesloft.com/search-advanced.php. How do I set up a check box or a drop down menu item so it is referred to when someone clicks the search button?

Thanks,
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Attachments:

search-advanced.php 32K

Re: [NigelGordijk] Advanced search form that mirrors CMSB sections

By robin - May 2, 2011

Hey Nigel,

You'll need to name the fields on your search page to correspond with the fields they are searching. For example your title field should probably be:

<input type="text" value="" class="inputField360" name="title">

This page shows how to setup search field names:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

Also, your results page should be using the generated list viewer code. Looks like it is, but I'm just checking.

If you still have some trouble, please post (or send to support@interactivetools.com) your plants-results.php code so we can take a look.

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Advanced search form that mirrors CMSB sections

By NigelGordijk - May 2, 2011

Hi, Robin. Thanks for your reply. A couple of issues with http://thecoachesloft.com/search-advanced.php.

1. When searching, regardless of what I put in the Title field, I get an error message: "Record not found!" The other text search fields - Variety, Description, Common Name, and Latin Name - seem to be working properly.

2. The options where you make a choice via a dropdown menu seem to be working ok, too. However, if you make choices using the checkboxes the results page shows all of the records, not just the matching ones.

I've attached the search and the results page.

Many thanks for your help.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Advanced search form that mirrors CMSB sections

By robin - May 3, 2011

Hey Nigel,

I think what's happening is some of the search is also applying to your other getRecords. You should add this line to all your getRecords except the products one that you are searching.
'allowSearch' => false,
For reference, here is a link to the viewer options:
http://www.interactivetools.com/docs/cmsbuilder/viewer_options.html

Your checkboxes should work if you remove the '[]' from their names.

Hope that helps,
Robin
Robin
Programmer
interactivetools.com