Show/Hide archetypes field

7 Messages Forum Options Options
Permalink
Davis, Michael
Show/Hide archetypes field
Reply Threaded More
Print post
Permalink
Hi,

I'm trying to hide certain archetypes fields based on workflow state. I
can do this using a hidden field with MasterSelectWidget, and drive the
value of the hidden field with workflow.

However, I was hoping there was a simpler way to do it, is there a way
to pass the results of a python method to the visible attribute, or
similar?

Cheers
Michael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Andreas Jung-5
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink


--On 3. Juli 2008 09:01:48 +0100 "Davis, Michael"
<m.r.davis@...> wrote:

> Hi,
>
> I'm trying to hide certain archetypes fields based on workflow state. I
> can do this using a hidden field with MasterSelectWidget, and drive the
> value of the hidden field with workflow.

Each field _can_ have its own write and read permission. So you might
introduce additional permissions as needed and manage them through your
workflow. That's the way to go.

-aj

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

attachment0 (201 bytes) Download Attachment
Davis, Michael
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink
Hi Andreas,

Did think about that, but the number of fields and workflow states would
make that a bit cumbersome, which was why we went for the
MasterSelectWidget solution.

Was hoping there was an easier way to just call an arbritarty python
method to determine whether a field should be in the edit form or not.

Cheers
Michael

-----Original Message-----
From: Andreas Jung [mailto:lists@...]
Sent: 03 July 2008 09:06
To: Davis, Michael; plone-users@...
Subject: Re: [Plone-Users] Show/Hide archetypes field



--On 3. Juli 2008 09:01:48 +0100 "Davis, Michael"
<m.r.davis@...> wrote:

> Hi,
>
> I'm trying to hide certain archetypes fields based on workflow state.
> I can do this using a hidden field with MasterSelectWidget, and drive
> the value of the hidden field with workflow.

Each field _can_ have its own write and read permission. So you might
introduce additional permissions as needed and manage them through your
workflow. That's the way to go.

-aj

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Andreas Jung-5
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink


--On 3. Juli 2008 09:11:34 +0100 "Davis, Michael"
<m.r.davis@...> wrote:

> Hi Andreas,
>
> Did think about that, but the number of fields and workflow states would
> make that a bit cumbersome, which was why we went for the
> MasterSelectWidget solution.
>
> Was hoping there was an easier way to just call an arbritarty python
> method to determine whether a field should be in the edit form or not.
>

Write our own custom base_edit template if you really need something
different :-)

Andreas

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

attachment0 (201 bytes) Download Attachment
Andreas Jung-5
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink


--On 3. Juli 2008 09:11:34 +0100 "Davis, Michael"
<m.r.davis@...> wrote:

> Hi Andreas,
>
> Did think about that, but the number of fields and workflow states would
> make that a bit cumbersome, which was why we went for the
> MasterSelectWidget solution.
>
> Was hoping there was an easier way to just call an arbritarty python
> method to determine whether a field should be in the edit form or not.
>
>
Or you generate a dynamic CSS file hidding/showing the fields as
needed based on some criteria you have to put inside the code for
generating the CSS.

-aj

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

attachment0 (201 bytes) Download Attachment
Martin Aspeli-2
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink

Davis, Michael wrote:
Hi Andreas,

Did think about that, but the number of fields and workflow states would
make that a bit cumbersome, which was why we went for the
MasterSelectWidget solution.

Was hoping there was an easier way to just call an arbritarty python
method to determine whether a field should be in the edit form or not.
Each widget has a 'condition' option which can a TALES expression to determine if it's visible or not.

Martin
Davis, Michael
Re: Show/Hide archetypes field
Reply Threaded More
Print post
Permalink
Hi Martin,

Exactly what I was looking for, not sure how I missed it in the docs.

Much appreciated
Cheers
Michael

-----Original Message-----
From: plone-users-bounces@...
[mailto:plone-users-bounces@...] On Behalf Of Martin
Aspeli
Sent: 03 July 2008 10:00
To: plone-users@...
Subject: Re: [Plone-Users] Show/Hide archetypes field




Davis, Michael wrote:

>
> Hi Andreas,
>
> Did think about that, but the number of fields and workflow states
> would make that a bit cumbersome, which was why we went for the
> MasterSelectWidget solution.
>
> Was hoping there was an easier way to just call an arbritarty python
> method to determine whether a field should be in the edit form or not.
>
>

Each widget has a 'condition' option which can a TALES expression to
determine if it's visible or not.

Martin

--
View this message in context:
http://www.nabble.com/Show-Hide-archetypes-field-tp18253806s6742p1825491
3.html
Sent from the General Questions mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users