-----Original Message-----
From: Hans [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 18, 2008 6:27 PM
To: Sameer Kumar
Cc: pmwiki-users@pmichaud.com
Subject: Re: [pmwiki-users] FoxEdit: another problem

Friday, April 18, 2008, 11:13:52 PM, Sameer Kumar wrote:

> When I use the "Edit" link to pull up the edit form, it comes with the
> PTV values populated from the page. If I want to remove any of the
> existing values, can I not just delete them in the edit form and then
> save changes? When I try that, the value does not get deleted on the
> page.

This is because by default you cannot post an empty value.
This makes it easier to update PTVs as all fields not used will not
change accidentally the PTVs.

To clear a PTV you can either enter NULL (or set $FoxClearPTVFmt to
some string you prefer rather than 'NULL', or you can add a parameter
to your form (I quote from cookbook.Fox):

ptvclear=name1,name2,name3,..
    On form submission any named fields which are empty (with no
value, but not 0) will clear the corresponding PTVs (erasing their
values). This option allows empty input on specific input fields.
Normally empty input will be ignored, and in order to clear a PTV a
special keyword needs to be used. This is defined with variable
$FoxClearPTVFmt and defaults to the keyword NULL: input of NULL will
clear a PTV.
 
ptvclear=1
    as above, but effective for all input fields saving to PTVs.

----------------------

I see! Thanks for pointing it out... I should have read the
documentation more carefully.


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to