@@ -28,13 +28,17 @@ public void Clear()
2828 }
2929 }
3030
31- public void Generate ( List < FormElementEntry > formElements )
31+ public void Generate ( List < FormElementEntry > formElements , bool insertPpidElement )
3232 {
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+ }
3842
3943 this . formElements = formElements ;
4044 while ( contentParent . transform . childCount != 0 )
@@ -63,9 +67,12 @@ public void Generate(List<FormElementEntry> formElements)
6367 }
6468 }
6569
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+ }
6976
7077 }
7178
0 commit comments