From 73439e8a27543eae4ec2e6d75d8ff26e3742c34f Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 10 Dec 2008 16:58:42 -0500 Subject: [PATCH] metaform lists types in alphabetical order --- metaform.php | 13 ++++++------- metaform/main.html | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/metaform.php b/metaform.php index 81ac452..b6456bd 100644 --- a/metaform.php +++ b/metaform.php @@ -56,14 +56,12 @@ $GLOBALS['types'] = array( ); function list_available_types() { - $types = ''; + ksort($GLOBALS['types']); foreach($GLOBALS['types'] as $key => $value) { - if($types) { - $types .= ', '; - } - $types .= $key; + tem_set('type', $key); + tem_show('types'); + tem_show('types_sep'); } - tem_set('available_types', $types); } @@ -116,8 +114,9 @@ function metaform() { set_form_action(); + tem_load('code/wfpl/metaform/main.html'); list_available_types(); - tem_output('code/wfpl/metaform/main.html'); + tem_output(); } diff --git a/metaform/main.html b/metaform/main.html index d56e264..5e72e66 100644 --- a/metaform/main.html +++ b/metaform/main.html @@ -27,7 +27,7 @@

Password protect this form (with HTTP authentication).

-

Below, specify the fields you'd like in your form, one field per line. After each field name, put at least one space, then the field type. The following field types are available: ~available_types.html~.

+

Below, specify the fields you'd like in your form, one field per line. After each field name, put at least one space, then the field type. The following field types are available: , ~type.html~.

Example:

 name      textbox
 phone     phone
-- 
1.7.10.4