Little problem with form

17 posts by 3 authors in: Forums > CMS Builder
Last Post: April 9, 2010   (RSS)

I know you have probably answered this 100 times but I cant seem to locate it.

I have this drop menu works great .........

<select name="jumpMenu0" id="jumpMenu0" onChange="MM_jumpMenu('parent',this,0)" style="color: #821789; font-family: Garamond; font-size:11pt" size="1">
<option>product type</option>
<?php foreach ($productsRecords as $record): ?>
<option value="<?php echo $record['_link'] ?>"> <?php echo $record['product_type'] ?></option>
<?php endforeach ?>
</select>

when you select it i wan it to go to a page like this http://skinsolutionsbymimi.com/productsList.php?product_type=Hair%20Care i am not sure how to code the ="<?php echo $record['_link'] ?>">

with the Product Type: <?php echo join(', ', getListLabels('products', 'product_type', $record['product_type'])); ?>

thanks
Patricia

www.thenetgirl.com

Re: [Jason] Little problem with form

No that didnt work at all i am trying instead of it going to a detail page which only oone product on a page to list page sorted by product type with all those products same types on a page.
Patricia

www.thenetgirl.com

Re: [thenetgirl] Little problem with form

By Jason - March 26, 2010

Sorry about that.
Try this:
<option value=productList.php?product_type="<?php
echo $record['product_type'];
?>">


CMS Builder comes with a built in search engine. If you were to type in http://skinsolutionsbymimi.com/productsList.php?product_type=Hair%20Care into your browser, the list page would automatically only show products with the product_type=Hair Care (2 items).

Let me know if that works. If you, maybe attach your php file and I can take a look at it for you.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [thenetgirl] Little problem with form

By Jason - March 26, 2010

Hi,

Sorry this is taking a bit. I've found a couple of problems. The reason why the menu isn't doing anything when an option is selected is because it is trying to call a javascript function called "MM_JumpMenu()". This function doesn't appear anywhere on the page and I can't find an external link to it. So this function needs to go back first.

After that. I think I've worked out the issues we've been having with how the drop downs are displayed. For treatment type, try this:
<option>treatment type</option>
<?php foreach ($productsRecords as $record): ?>
<option value="productList.php?treatment=<?php echo $records['treatment'] ?>" ><?php echo $record['treatment']; ?></option>
<?php endforeach ?>


For product type, try this:
<option>product type</option>
<?php foreach ($productsRecords as $record): ?>
<option value="productList.php?product_type="<?php echo $record['product_type']; ?>"><?php echo $record['product_type']; ?></option>
<?php endforeach ?>


Give that a try and let me know how it works. The biggest problem is getting the MM_JumpMenu function back, since the drop down menu won't do anything until then.

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/

Re: [Jason] Little problem with form

both of these codes are differnt codes one with "" and; and one with out I tried them both ways - didnt work

the orginal jump menu i had works but takes them to a detail page i want a list page



I will set it back so you can see it actually works
Patricia

www.thenetgirl.com

Re: [Jason] Little problem with form

Ok I put the function on the header page instead of the individual pages http://www.skinsolutionsbymimi.com/index.php - the drop works

but i see another problem each page gets added by product page instead of each category

you can see in the product type - Hair display 2 times one for each product/page so far

I want 1 page for each type of product when they chose that it displays a list of products under that category.
Patricia

www.thenetgirl.com

Re: [thenetgirl] Little problem with form

ok i researched everypost on this forum and i got pretty far .....................
I have gotten the search to work sort of

it will work perfectly on this page only ------

http://www.skinsolutionsbymimi.com/productsDetail.php?Aloe-Cort-1-Hydrodcortisone-1

and i think its because i am using $productsRecord['product_type']) ?> instead of $record['product_type']) ?>

but it wont work at all with that code on any page

here is my new code

<td valign="top">
<form id="form" action="productsList.php">
<select name="product_type" class="dropdown" id="type" size="1" style="font-family: Garamond; color: #821789; font-size: 10pt" >
<?php $options = getListLabels('products', 'product_type', $productsRecord['product_type']) ?>
<option>product type</option>
<?php foreach($options as $option): ?>
<option><?php echo htmlspecialchars($option) ?></option>
<?php endforeach ?> </select></td>
<td valign="top" width="6"><input src="buttons/greygo.gif" type="image" value="Search" name="I1"> </td></form>
<td valign="bottom" width="26">&nbsp;</td>
<td width="6" valign="top"> -----------------------------------------treatment code-----------------
<form id="form" action="productsList.php">
<select name="treatment" class="dropdown" id="type" size="1" style="font-family: Garamond; color: #821789; font-size: 10pt" >
<?php $options = getListLabels('products', 'treatment', $productsRecord['treatment']) ?>
<option>treatment</option>
<?php foreach($options as $option): ?>
<option><?php echo htmlspecialchars($option) ?></option>
<?php endforeach ?> </select></td>
Patricia

www.thenetgirl.com

Re: [thenetgirl] Little problem with form

By Jason - March 29, 2010

Hi,

I looked at the productsList.php page again, and now I see that the dropdown lists are not being populated at all.
If you could attach the productsList.php file I can take a look at it and maybe able to point you in the right direction.

Let me know.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [thenetgirl] Little problem with form

I have found that the drops are only including what catergories are on each detail page .
Patricia

www.thenetgirl.com