[Product-Developers] dexterity [newbie] : how to disable a Field widget
T. Kim Nguyen
nguyen at uwosh.edu
Sat Nov 12 05:35:01 UTC 2011
Hi David - we've had that particular use case a few times here: we want to populate a student ID field but don't want the student to be able to change it, while a staff member filling out the object on behalf of the student might need to change it.
Kim
On Nov 11, 2011, at 11:25 PM, David Glick wrote:
> On 11/9/11 1:16 AM, gnafou wrote:
>> Hello,
>>
>> 1/Developping my first dexterity product, i've been trying to 'disable' a field widget .. but could not find how ( i have default values that should be visible but must not be changed )
>> maybe i should do that with a specific css style ??
> I don't think Dexterity has support for this without creating a customized widget. It seems like an unusual use case to me. Why do you need to show something without letting the user change it?
>
> One way to do it would be with javascript when the page loads.
>> 2/ I was wondering if it s possible to add an html paragraph in the body of the form
> You can use HTML in field descriptions. Otherwise you need to create a custom edit form (see Dexterity manual) and customize the template.
>
> cheers,
> David
>
>
> ----------
> David Glick
> Web Developer
> davidglick at groundwireconsulting.com
> 206.286.1235x32
>
> Groundwire Consulting is here.
>
> http://groundwire.org/about/FAQ-gw-consulting
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
More information about the Product-Developers
mailing list