[pmwiki-users] FoxEdit: another problem

Hans design5 at softflow.co.uk
Fri Apr 18 17:26:49 CDT 2008

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):

    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.
    as above, but effective for all input fields saving to PTVs.


More information about the pmwiki-users mailing list