Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -782,8 +782,8 @@ |
783 | 783 | $field_args['part_of_multiple'] = $allow_multiple; |
784 | 784 | if ( count( $show_on_select ) > 0 ) |
785 | 785 | $field_args['show on select'] = $show_on_select; |
786 | | - // get the value from the request, if it's there, and if it's not |
787 | | - // an array |
| 786 | + // Get the value from the request, if |
| 787 | + // it's there, and if it's not an array. |
788 | 788 | $escaped_field_name = str_replace( "'", "\'", $field_name ); |
789 | 789 | if ( isset( $template_instance_query_values ) && |
790 | 790 | $template_instance_query_values != null && |
— | — | @@ -821,11 +821,8 @@ |
822 | 822 | } |
823 | 823 | } |
824 | 824 | |
825 | | - // Handle the free text field - if it was declared as |
826 | | - // "field|free text" (a deprecated usage), it has to be outside |
827 | | - // of a template. |
828 | | - if ( ( $template_name == '' && $field_name == 'free text' ) || |
829 | | - $field_name == '<freetext>' ) { |
| 825 | + // Handle the free text field. |
| 826 | + if ( $field_name == '<freetext>' ) { |
830 | 827 | // Add placeholders for the free text in both the form and |
831 | 828 | // the page, using <free_text> tags - once all the free text |
832 | 829 | // is known (at the end), it will get substituted in. |
— | — | @@ -943,14 +940,15 @@ |
944 | 941 | } else { // value is not an array |
945 | 942 | $cur_value_in_template = $cur_value; |
946 | 943 | } |
947 | | - if ( $template_name == null || $template_name == '' ) |
| 944 | + if ( $template_name == null || $template_name == '' ) { |
948 | 945 | $input_name = $field_name; |
949 | | - elseif ( $allow_multiple ) |
| 946 | + } elseif ( $allow_multiple ) { |
950 | 947 | // 'num' will get replaced by an actual index, either in PHP |
951 | 948 | // or in Javascript, later on |
952 | 949 | $input_name = $template_name . '[num][' . $field_name . ']'; |
953 | | - else |
| 950 | + } else { |
954 | 951 | $input_name = $template_name . '[' . $field_name . ']'; |
| 952 | + } |
955 | 953 | |
956 | 954 | // if we're creating the page name from a formula based on |
957 | 955 | // form values, see if the current input is part of that formula, |
— | — | @@ -1193,8 +1191,8 @@ |
1194 | 1192 | // ===================================================== |
1195 | 1193 | // default outer level processing |
1196 | 1194 | // ===================================================== |
1197 | | - } else { // tag is not one of the three allowed values |
1198 | | - // ignore tag |
| 1195 | + } else { // Tag is not one of the three allowed values - |
| 1196 | + // ignore the tag. |
1199 | 1197 | $start_position = $brackets_end_loc; |
1200 | 1198 | } // end if |
1201 | 1199 | } // end while |
— | — | @@ -1288,8 +1286,8 @@ |
1289 | 1287 | if ( ! $free_text_was_included ) { |
1290 | 1288 | $form_text .= SFFormUtils::hiddenFieldHTML( 'free_text', '!free_text!' ); |
1291 | 1289 | } |
1292 | | - // get free text, and add to page data, as well as retroactively |
1293 | | - // inserting it into the form |
| 1290 | + // Get free text, and add to page data, as well as retroactively |
| 1291 | + // inserting it into the form. |
1294 | 1292 | |
1295 | 1293 | // If $form_is_partial is true then either: |
1296 | 1294 | // (a) we're processing a replacement (param 'partial' == 1) |