[pmwiki-users] getting form variables
    Tom Carchrae 
    carchrae at 4c.ucc.ie
       
    Thu Mar 23 07:28:59 CST 2006
    
    
  
hi,
i am working with the forms markup (:input :) and would
like to be able to display the form value in a subsequent
wiki page.
eg, on one page:
(:input form "pmwiki.php?n=Page2":)
(:input text name size=30:)
(:input end:)
and then on Page2
hello (:getarg name:)!
----
any ideas?
i tried the following markup hack:
function mygetarg($argname)
{
	if (isset($_REQUEST[$argname]))
	  return $_REQUEST[$argname];
	else
	  return "";
}
Markup('getarg', 'fulltext',
   '/\\(:getarg (.*?):\\)/',
   mygetarg('$1'));
i did some debugging, and i notice that part of the problem is
the order of parsing the code.  for example, it appears that $1
is passed to my function, instead of what $1 represents, eg
'name'.  so maybe this is my fault?  i tried '$1' -> $1 but
that didnt work.
any tips/pointers appreciated.
tom
    
    
More information about the pmwiki-users
mailing list