Hidden - By Any Other Means?
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 6, 2011 (RSS)
By Perchpole - May 5, 2011
Is it possible to trigger the built-in Hidden property using something other than a checkbox?
I'd like to set-up a drop-down menu called "Status" which would give the user a number of options from which to choose, such as:
Archived
Featured
News Item
Etc...
It would be nice to add the "Hidden" property to this list but I'm guessing it wouldn't function like the built-in feature.
Is there any way to mimic it?
:o/
Perch
I'd like to set-up a drop-down menu called "Status" which would give the user a number of options from which to choose, such as:
Archived
Featured
News Item
Etc...
It would be nice to add the "Hidden" property to this list but I'm guessing it wouldn't function like the built-in feature.
Is there any way to mimic it?
:o/
Perch
Re: [Perchpole] Hidden - By Any Other Means?
By Jason - May 6, 2011
Hi Perch,
In order to get the automatic functionality of the hidden field, the need to use the special field name. In your example, however, you can easily mimic it in your WHERE clause.
If you had an option in status called "Hidden" you can put this in your query:
So any records where you selected "Hidden" would not be returned.
Hope this helps.
In order to get the automatic functionality of the hidden field, the need to use the special field name. In your example, however, you can easily mimic it in your WHERE clause.
If you had an option in status called "Hidden" you can put this in your query:
'where' => "status != 'Hidden'",
So any records where you selected "Hidden" would not be returned.
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/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/