[Zope-CMF] Re: CMF 1.3 - Can't set new memberdata properties

Tres Seaver tseaver@zope.com
08 Aug 2002 15:40:54 -0400


On Thu, 2002-08-08 at 14:58, John_Knutson@candle.com wrote:
> Tres,
> 
> Sorry to send this to you directly but it got bounced by your mail server.
> Hopefully this will get through.

> I'm running CMF 1.3 (was using beta2 but just upgraded to the main release.
> 
> I have created a new memberdata property (a boolean called notify) and have
> modifed personalise_form.dtml to display the current value and allow it to
> be changed (using the code that sets the listed attribute as an example).
> 
> When I use the Preferences page to try set the 'notify' value, the value is
> not set. I can change the email and listed properties on the same page.

I just made this work as you describe.  One possibile weirdness might
be if you used a single checkbox, rather than a pair of radio buttons,
to represent the value.  If so, you need to add a hidden input, e.g.:

  <input type="hidden" name="notify:default:int" value="0">

so that the value will still be in the request, even if the user clears
the checkbox.
 
> Do I need to do something special to set new properties? If not, why does
> this not work?
> 
> I've been tearing my hair out over this, so any response would be very
> welcome.

My 'personalize_form' just copied the entire table row for 'listed' and
renamed things to use 'notify'.  At that point, the changes to 'notify'
were "sticky".

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com