Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc |
— | — | @@ -448,6 +448,7 @@ |
449 | 449 | if ($field_name == 'free text' || $field_name = '<freetext>') { |
450 | 450 | $free_text_preload_page = $sub_components[1]; |
451 | 451 | } else { |
| 452 | + // this variable is not used |
452 | 453 | $preload_page = $sub_components[1]; |
453 | 454 | } |
454 | 455 | } elseif ($sub_components[0] == 'values') { |
— | — | @@ -632,8 +633,12 @@ |
633 | 634 | // form values, see if the current input is part of that formula, |
634 | 635 | // and if so, substitute in the actual value |
635 | 636 | if ($form_submitted && $generated_page_name != '') { |
636 | | - $true_input_name = str_replace('_', ' ', $input_name); |
637 | | - $generated_page_name = str_ireplace("<$true_input_name>", $cur_value_in_template, $generated_page_name); |
| 637 | + $generated_page_name = str_replace('.', '_', $generated_page_name); |
| 638 | + $generated_page_name = str_replace(' ', '_', $generated_page_name); |
| 639 | + $generated_page_name = str_ireplace("<$input_name>", $cur_value_in_template, $generated_page_name); |
| 640 | + // once the substitution is done, replace underlines back |
| 641 | + // with spaces |
| 642 | + $generated_page_name = str_replace('_', ' ', $generated_page_name); |
638 | 643 | } |
639 | 644 | // disable this field if either the whole form is disabled, or |
640 | 645 | // it's a restricted field and user doesn't have sysop privileges |