@@ -28,13 +28,17 @@ public void Clear()
28
28
}
29
29
}
30
30
31
- public void Generate ( List < FormElementEntry > formElements )
31
+ public void Generate ( List < FormElementEntry > formElements , bool insertPpidElement )
32
32
{
33
- ppidElement = new FormElementEntry ( ) ;
34
- ppidElement . displayName = "Participant ID" ;
35
- ppidElement . internalName = "ppid" ;
36
- ppidElement . dataType = FormDataType . String ;
37
- formElements . Insert ( 0 , ppidElement ) ;
33
+ if ( insertPpidElement )
34
+ {
35
+ ppidElement = new FormElementEntry ( ) ;
36
+ ppidElement . displayName = "Participant ID" ;
37
+ ppidElement . internalName = "ppid" ;
38
+ ppidElement . dataType = FormDataType . String ;
39
+ formElements . Insert ( 0 , ppidElement ) ;
40
+
41
+ }
38
42
39
43
this . formElements = formElements ;
40
44
while ( contentParent . transform . childCount != 0 )
@@ -63,9 +67,12 @@ public void Generate(List<FormElementEntry> formElements)
63
67
}
64
68
}
65
69
66
- // set ppid field to current time
67
- TextFormController ppidText = ( TextFormController ) ppidElement . controller ;
68
- ppidText . SetToTimeNow ( ) ;
70
+ if ( insertPpidElement )
71
+ {
72
+ // set ppid field to current time
73
+ TextFormController ppidText = ( TextFormController ) ppidElement . controller ;
74
+ ppidText . SetToTimeNow ( ) ;
75
+ }
69
76
70
77
}
71
78
0 commit comments