Checkbox Issue

10 posts by 3 authors in: Forums > CMS Builder
Last Post: August 25, 2011   (RSS)

Re: [northernpenguin] Checkbox Issue

By gkornbluth - August 18, 2011 - edited: August 18, 2011

Hi Ragi,

Didn't get to look too closely, but I assume that you've already tried variations on things like:

'where' => "french_qsp = '0' ",
and
<?PHP foreach ($dms_home_pageRecords as $record ): ?>
<?PHP if ($record['french_qsp'] == 1): ?>

Rest of your code...

<?php endforeach; ?>

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Checkbox Issue

Hi Gerry

Yes, I have, but part of the problem is where do I actually place the foreach statement. There are actually two forms on the page, so I tried placing a foreach/if around that first code, but got nowhere.

Any ideas?

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Checkbox Issue

Actually, I don't see you using dms_home_page anywhere in your code except for the list records call, so I'm not sure how to do what you are trying to do.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [northernpenguin] Checkbox Issue

By Jason - August 18, 2011

Hi Ragi,

Is the code you're posting from specialResults_f.php or is this just the search form? Could you post the .php page where you want to display your results? Also, which section are your documents stored in?

Let me know and we'll try to make some suggestions.

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] Checkbox Issue

Unfortunately, I can't get to the files until tomorrow. However, the code I posted above is from index_f.php (search form). specialResults_f. Php is the output. The documents are stored in dms_home_page.
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Checkbox Issue

By Jason - August 18, 2011

Hi Ragi,

If specialResults_f.php is where we're actually performing the search and producing the output, this is where the change would have to take place.

On that page, you could try the code suggested by Jerry:

'where' => "french_qsp = '1' ",

You'll want to use the number 1, since this is the value of the field when the check box is checked.

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/

Re: [Jason] Checkbox Issue

Thanx Jason. I will give it a try tomorrow.
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Jason] Checkbox Issue

By northernpenguin - August 22, 2011 - edited: August 22, 2011

Jason: worked great! Now, one more question. How do I include two 'where' statements on the same page?

"french_qsp = '1'" and "archive = '0'"
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Checkbox Issue

Hi Ragi,

Have you tried:

'where' => "french_qsp = '1' AND archive = '0' ",

(saw something like that in another post)

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php