Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
populating a drop down list

 

 


ChrisTitchenal
User

Feb 28, 2008, 10:18 AM

Post #1 of 4 (545 views)
Shortcut
populating a drop down list Can't Post

Hey Dave, well now that I have the categories list working I am feeling pretty cocky.

Let see if I can do this, the clients wants a drop down list of all the business that are listed in the coupon menu so we have a title field in the coupon menu with there name and we need to link it to there couponPage.php any thoughts would be great.

I came into work today sick and not wanting to work but after getting the menu to work so fast I feel a whole lot better Smile Thanks Dave.


Dave
Staff / Moderator


Feb 28, 2008, 1:20 PM

Post #2 of 4 (539 views)
Shortcut
Re: [ChrisTitchenal] populating a drop down list [In reply to] Can't Post

The first step is always to figure out what kind of output you need. I'm thinking you want something like this:


Code
<form method="get" action="couponPage.php"> 
<select name="title">
<option>Business Name Here</option>
<option>Business Name Here</option>
<option>Business Name Here</option>
</select>
</form>


The simplest would probably just be another list viewer that outputs just business names.

Just hardcode the options to list everything (per page = 1, pagenum = 1, where = 1, etc) and develop it on a separate page with nothing else before cutting and pasting it over. It will go a lot faster that way.

Would that work for you? See how far you can get and then post the code (and an url to the test viewer for it) and I'll help you out if you get stuck on anything.

Dave Edis - Senior Developer
interactivetools.com


ChrisTitchenal
User

Feb 29, 2008, 7:04 AM

Post #3 of 4 (527 views)
Shortcut
Re: [Dave] populating a drop down list [In reply to] Can't Post

Thanks Dave, I have the list being populated and built now just 2 questions.

1. can I set it to display all listings on one page insted of telling it a number per page.

2. The search is going to the page view not list view and doing it by title is not working would num work for this.



Code
   <form method="get" action="couponPage.php">   
<select name="">
<?php foreach ($listRows as $record): ?>
<option value="<?php echo $record['title'] ?>-<?php echo $record['num'] ?>"> <?php echo $record['title'] ?> </option>
<?php endforeach ?>
</select> <input type="submit" value="Search"> </form>





I can get really close but the link it makes says

http://clikquikcoupons.com/proof/couponPage.php?=AAMCO-2
when it should read
http://clikquikcoupons.com/proof/couponsPage.php?AAMCO-2/

any ideas



Edit found the problem was a typo ugh but my first questions still stands how can I make sure all listings will always be displayed
Thanks Dave you and your php skills rock

Chirs


(This post was edited by ChrisTitchenal on Feb 29, 2008, 7:46 AM)


Dave
Staff / Moderator


Feb 29, 2008, 8:59 AM

Post #4 of 4 (521 views)
Shortcut
Re: [ChrisTitchenal] populating a drop down list [In reply to] Can't Post

Glad to hear it's working now!

>1. can I set it to display all listings on one page
>instead of telling it a number per page.

Just set the perPage to a high number, pageNum to 1, and remove the prev/next buttons. So you're options for those might look like this:


Code
$options['perPage'] = '100000'; 
$options['pageNum'] = '1';


Would that work for what you need?

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4