Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -652,7 +652,7 @@ |
653 | 653 | $input_type = null; |
654 | 654 | $field_args = array(); |
655 | 655 | $show_on_select = array(); |
656 | | - $default_value = ""; |
| 656 | + $default_value = null; |
657 | 657 | $possible_values = null; |
658 | 658 | $semantic_property = null; |
659 | 659 | $preload_page = null; |
— | — | @@ -780,12 +780,15 @@ |
781 | 781 | // necessary. |
782 | 782 | $field_args['no autocomplete'] = true; |
783 | 783 | } |
784 | | - if ( $allow_multiple ) |
| 784 | + if ( $allow_multiple ) { |
785 | 785 | $field_args['part_of_multiple'] = $allow_multiple; |
786 | | - if ( count( $show_on_select ) > 0 ) |
| 786 | + } |
| 787 | + if ( count( $show_on_select ) > 0 ) { |
787 | 788 | $field_args['show on select'] = $show_on_select; |
| 789 | + } |
788 | 790 | // Get the value from the request, if |
789 | 791 | // it's there, and if it's not an array. |
| 792 | + $cur_value = null; |
790 | 793 | $escaped_field_name = str_replace( "'", "\'", $field_name ); |
791 | 794 | if ( isset( $template_instance_query_values ) && |
792 | 795 | $template_instance_query_values != null && |
— | — | @@ -805,8 +808,6 @@ |
806 | 809 | if ( $form_submitted || ( ! empty( $field_query_val ) && ! is_array( $field_query_val ) ) ) { |
807 | 810 | $cur_value = $field_query_val; |
808 | 811 | } |
809 | | - } else { |
810 | | - $cur_value = ''; |
811 | 812 | } |
812 | 813 | |
813 | 814 | if ( empty( $cur_value ) && !$form_submitted ) { |