[pmwiki-users] Trouble with FoxEdit help and thanks

Gene Horodecki geneh at shaw.ca
Sat Dec 5 21:55:40 CST 2009


Hi there.  I was wondering if someone could assist me with Fox, 
FoxDelete, and FoxEdit.  I've read all the cookbook pages and I am still 
a little lost.

My needs are very simple.  I would like to add lines to a single table 
with a form at the bottom of the table.  This I have been able to do.  
Furthermore, I need to have a delete link on the end of every row and 
this I have done by adding a foxdelete link.

My trouble is with fox edit.  I need two edit links on each row.  One 
will be available to the person who added the line, basically to re-edit 
the contents with a form.  A second edit link needs to be available to a 
person acting as an approver who will get a form to fill in a couple 
more fields in the form.

I tried putting a plain FoxEdit link in the row but it does not work 
like FoxDelete and apply only to that row by defailt.  Instead, it wants 
to edit the raw contents of the entire page.  First of all, I only want 
to edit the contents of the table row and secondly, I want to prefill a 
form with the contents and be able to submit the edit with a form.  I 
don't want to see the raw contents.

I played with PTVs a little bit, having a PTV for each cell of the 
table.  I had hoped that a PTV could be bound to the scope of the fox 
section but this is not the case.  Instead  the entire page gets 
rendered with the last assignment on the page.  So, it would seem that I 
need to make the PTVs for every row uniuqe to that row.

I pretty much understand how FoxContacts works but it seems to get 
around this PTV issue by creating a different page for each contact.

Could someone help me get on the right track here?  This is what my 
table looks like with two rows and the form at the bottom:

(:foxmessages:)\\

||border=1
|| '''Account''' || '''Change #''' || '''Date/Time''' || 
'''Implementer''' || '''Approved By''' || '''Approve Time''' || 
'''Actions''' ||
#foxbegin 1259874157a54690b0#
|| account1 || 1234 || 2334 || user1 || || || (:if author 
user1:){[foxdelline 1259874157a54690b0 {$FullName} ]} {[foxedit]}(:if:) ||
#foxend 1259874157a54690b0#
#foxbegin 1260047502a57731b0#
|| account2 || 1234 || 1234 || user1 || || || (:if author 
user1:){[foxdelline 1260047502a57731b0 {$FullName} ]} {[foxedit]}(:if:) ||
#foxend 1260047502a57731b0#
(:fox cbox put=aboveform template=Site.FoxChangeTableTemplate 
foxsuccess="Change posted successfully":)
\\

||border=0
||Account: ||(:input text account size=60:)||
||Change #: ||(:input text changenum size=60:)||
||Date/Time: ||(:input text time size=60:)||
||Implementer: ||(:input text implementer value='{$Author}' :) ||
(:input submit post Enter:)
(:foxend cbox:)

And my template:

#foxbegin#
|| {$$account} || {$$changenum} || {$$time} || {$$implementer} || || || 
(:if author {$$implementer}:){[foxdelline]} {[foxedit]}(:if:) ||
#foxend#


Thanks....





More information about the pmwiki-users mailing list