Skip to Content.
Sympa Menu

en - [en@sympa] Evaluating input in form fields

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: "Silvers, Tim" <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: [en@sympa] Evaluating input in form fields
  • Date: Tue, 15 Nov 2022 18:53:12 +0000

Hi. Has anyone customized Sympa to perform any form field input validations? In our case, we would like to ensure that any created lists include a ā€œ-Lā€ (i.e., dash el) in their names. The code is in create_list_request.tt2 and I have been reviewing the template directives [1] in an attempt to find a solution. Perhaps a FILTER would work? Or a PERL block?

 

Here is the code from create_list_request.tt2:

 

<input type="text" id="listname" name="listname" size="30" value="[% saved.listname %]" />

                <!-- CODE CHECK FOR DASH EL IN LIST NAME -->

                [% IF saved.listname !~ '<chars>-L$' %]

                   [% SET saved.listname = ${saved-listname} _ '-l' %]

                [% END %]

 

[1] http://www.template-toolkit.org/docs/manual/Directives.html#section_Conditional_Processing

 

Tim

 




Archive powered by MHonArc 2.6.19+.

Top of Page