Search

45 posts by 5 authors in: Forums > CMS Builder
Last Post: May 19, 2010   (RSS)

By gcod - May 7, 2010

And here is the php file.

The list of price table is not there because it's not created yet.

If you have a better solution for the range of price let me know.

Thanks.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Donna - May 7, 2010

Hi gcod,

Can you try attaching that file again? It doesn't look like it came through.
Donna

--
support@interactivetools.com

Re: [Donna] Search

By gcod - May 7, 2010

Here you go.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com
Attachments:

produits.php 6K

By gcod - May 10, 2010

Hi Jason,

For the price I'll create a table with range of prices, I'll call it range_price, and I'll list all the possible range. Then I'll select the proper range in the wine table.
I'll have an other field with the specific price but I won't use it in the search, I'll only use the range.

For the text field I'd like to search for every tables that are already in the first drop downs (wines, producers, year, cepage, country and region).

So if someone type a year and select a range of price I'd like to show all the price that fit this search.

Last 2 things: How can I NOT show any wine when you arrive on the page and How can I show ALL the wines when the user click "View all wines".

Thanks for you help!
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Jason - May 11, 2010

Hi,

I see that you have 6 tables that you want to search (wines,producers,year,cepage,country,and region). But to do a search, you need to be searching against specific fields inside those tables. Can you tell me exactly which fields in each table you want the text box to search?

Also, can you attach the .php file where the user enters the search information.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gcod - May 11, 2010

Hi Jason,

For each of them the fields name are title.

I'm not sure what you want for the php page. I can give you the latest version of the page which include the text field and the drop down for the price range but the text field is connected to nothing right now.

Let me know and thanks for your help.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com
Attachments:

produits_001.php 7K

Re: [gcod] Search

By Jason - May 12, 2010

Hi,

So to start, you're going to want to put <form> tags around your text field.
Also, if you change the name of your text field to "title", we can use it to do our search automatically. It would look something like this:

<form name="search" method="post" action="produits.php">
<input name="title" type="text" style="width:200px;"/>
<input type="submit" value="Search" />
</form>


This is just an example. Since the name of the text field is the same as the name of the fields in the tables (title), CMS Builder will automatically do a search when we submit the form.

The price range will be a bit tricker and will require some more code. Start by seeing if you can get the text field to work.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gcod - May 12, 2010

Hi Jason,

It doesn't work.

After typing a value that you can find in one of the table (portugal or rioja) and hitting the search button, no value is displayed and the search drop down are all empty by the producer one.

No sure what is going on here.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Donna - May 13, 2010

Hi gcod,

In your dropdown menus, you'll want to set the value of your "Any" (or the default "nothing selected") fields to just "". Right now, they're all set to 0, so you're actually searching every one of those fields for the value "0".

Instead, it'll look something like this:

<option value="" selected="selected">Name of Dropdown</option>

Give that a try and let me know if it starts working for you. :)
Donna

--
support@interactivetools.com