[pmwiki-users] How to update page text variables using pmform when the PTV names are variable

Randy Brown alongkiss at aprivatespot.com
Thu Mar 31 20:36:07 CDT 2011


Does anyone know how to update page text variables using pmform when the PTV names are variable? 

For example on the page is:
(:JaneDoe: 1:)
(:JaneDoeComments: I selected number one but I might change it:)

I tried the following form (and several variations), but everything failed:

[[#myform]]
(:input pmform target=saveptvs:)
(:input default source={*$FullName} request=1 :)
(:messages:)
(:table cellpadding=5px:)
(:cell:)
%bold% $[Your selection code:]%%
(:cell:)
(:input form:)
(:input select name={$Author} value="" label="$[Please select]":)
(:input select name={$Author} value=2 label="2":)
(:input select name={$Author} value=1 label="1":)
(:cellnr:)
%bold% $[Comments:]
(:cell:)
(:input text {$Author}Comments size=60:)
(:cellnr:)
(:cell:)
%indent%(:input submit name=post value="$[Post]" :)
(:tableend:)
(:input end:)
[[#myformend]]

[[#mypost]]
(:template defaults savevars={$Author},{$Author}Comments:)
(:template require {$$Author} errmsg="$[Missing selection code]":)
[[#mypostend]]

Randy


More information about the pmwiki-users mailing list