[pmwiki-users] FoxEdit: another problem

Sameer Kumar skumar at eharch.com
Fri Apr 18 17:50:31 CDT 2008



-----Original Message-----
From: Hans [mailto:design5 at softflow.co.uk] 
Sent: Friday, April 18, 2008 6:27 PM
To: Sameer Kumar
Cc: pmwiki-users at 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.




More information about the pmwiki-users mailing list