Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Create a plugin to do same as 'hidden' field

 

 


rjbathgate
User

Jul 31, 2011, 7:06 PM

Post #1 of 4 (1190 views)
Shortcut
Create a plugin to do same as 'hidden' field Can't Post

Hello,

I want to have a field operate in a similar manner to the 'hidden' field (but the other way around, i.e. checked = displayed, unchecked = hidden).

Lets call it 'display'.

I can manually add this (display = 1) into the $where for the viewer but thought the cleanest way would be via plugin... (which works like this: if 'display' exists in table, then the 'where display = 1' is added to the rest of the 'where'.

I'm not sure where to start to integrate it as a plugin...

Cheers
Rob


robin
User / Moderator


Aug 1, 2011, 10:31 AM

Post #2 of 4 (1160 views)
Shortcut
Re: [rjbathgate] Create a plugin to do same as 'hidden' field [In reply to] Can't Post

Hey Rob,

Plugins get into some really advanced stuff. It will be a lot easer and cleaner to add the 'where' => "display='1'" to your viewers.

If you are really interested in setting up a plugin though, you can check out the free plugins on the user submited page for examples and ideas.

http://www.interactivetools.com/add-ons/?user_submitted=1

Hope that helps,
Robin


gkornbluth
Veteran

Aug 29, 2011, 10:01 AM

Post #3 of 4 (1049 views)
Shortcut
Re: [rjbathgate] Create a plugin to do same as 'hidden' field [In reply to] Can't Post

Hi Rob,

Any way you could use (or modify) one of the the Show/Hide plugins on the user submitted plugins page?

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
http://www.thecmsbcookbook.com


rjbathgate
User

Aug 29, 2011, 12:51 PM

Post #4 of 4 (1045 views)
Shortcut
Re: [gkornbluth] Create a plugin to do same as 'hidden' field [In reply to] Can't Post

Hey gkornbluth,

Yeah I was going to take a look at existing plugins and amend... but ran out of time and had to just go for the plain and simple route...

Next time thou :)

Cheers