@@ -39,7 +39,11 @@ function smarty_function_edit_custom_field($params, &$smarty)
39
39
40
40
// TODO make sense of this. Both are required in different contexts
41
41
// - in form builder, review page - the latter is needed.
42
- if (isset ($ field_info ["submission_value " ]) || is_null ($ field_info ["submission_value " ])) {
42
+
43
+ // hide password
44
+ if ($ field_type_info ["field_type_identifier " ] == "password " )
45
+ echo "******** " ;
46
+ else if (isset ($ field_info ["submission_value " ]) || is_null ($ field_info ["submission_value " ])) {
43
47
echo $ field_info ["submission_value " ];
44
48
} else {
45
49
echo $ field_info ["submission_info " ]["value " ];
@@ -51,14 +55,17 @@ function smarty_function_edit_custom_field($params, &$smarty)
51
55
}
52
56
53
57
// now construct all available placeholders
58
+ // note that we don't send the encrypted value of password, instead "********" is sent
54
59
$ placeholders = array (
55
60
"FORM_ID " => $ form_id ,
56
61
"VIEW_ID " => $ field_info ["view_id " ],
57
62
"SUBMISSION_ID " => $ submission_id ,
58
63
"FIELD_ID " => $ field_info ["field_id " ],
59
64
"NAME " => $ field_info ["field_name " ],
60
65
"COLNAME " => $ field_info ["col_name " ],
61
- "VALUE " => isset ($ field_info ["submission_value " ]) ? $ field_info ["submission_value " ] : "" ,
66
+ "VALUE " => $ curr_field_type ["field_type_identifier " ] != "password " ?
67
+ (isset ($ field_info ["submission_value " ]) ? $ field_info ["submission_value " ] : "" )
68
+ : "******** " ,
62
69
"SETTINGS " => $ settings ,
63
70
"CONTEXTPAGE " => "edit_submission " ,
64
71
"ACCOUNT_INFO " => Sessions::getWithFallback ("account " , array ()),
0 commit comments