[ZPT] string manipulation of form submissions

Clemens Robbenhaar robbenhaar at espresto.com
Fri Sep 5 16:41:16 EDT 2003



 > Basically I have a search form where you can type a letter, and a %
 > needs to be added after that string (after the form is submitted.

 Well, if it needs to be done inside the template,
something like

<tal:hack define="global form_data python:'%s%%' % request['form_data']" />

should do it ... the variable "form_data" will contain the corresponding
request variable appended by a "%" afterwards.

Cheers,
Clemens




More information about the ZPT mailing list