Merge pull request #2279 from colemanw/optionForms
[civicrm-core.git] / xml / schema / Campaign / Survey.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Campaign</base>
4 <class>Survey</class>
5 <name>civicrm_survey</name>
6 <comment>Campaign Survey Details.</comment>
7 <add>3.2</add>
8
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Survey id.</comment>
14 <add>3.3</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20
21 <field>
22 <name>title</name>
23 <title>Survey Title</title>
24 <type>varchar</type>
25 <length>255</length>
26 <required>true</required>
27 <comment>Title of the Survey.</comment>
28 <import>true</import>
29 <add>3.3</add>
30 </field>
31
32 <field>
33 <name>campaign_id</name>
34 <type>int unsigned</type>
35 <default>NULL</default>
36 <comment>Foreign key to the Campaign.</comment>
37 <pseudoconstant>
38 <table>civicrm_campaign</table>
39 <keyColumn>id</keyColumn>
40 <labelColumn>title</labelColumn>
41 </pseudoconstant>
42 <add>3.3</add>
43 </field>
44 <foreignKey>
45 <name>campaign_id</name>
46 <table>civicrm_campaign</table>
47 <key>id</key>
48 <add>3.3</add>
49 <onDelete>SET NULL</onDelete>
50 </foreignKey>
51
52 <field>
53 <name>activity_type_id</name>
54 <title>Activity Type ID</title>
55 <type>int unsigned</type>
56 <default>NULL</default>
57 <comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
58 <import>true</import>
59 <add>3.3</add>
60 <pseudoconstant>
61 <optionGroupName>activity_type</optionGroupName>
62 </pseudoconstant>
63 <html>
64 <type>Select</type>
65 </html>
66 </field>
67 <index>
68 <name>UI_activity_type_id</name>
69 <fieldName>activity_type_id</fieldName>
70 <add>3.3</add>
71 </index>
72
73 <field>
74 <name>recontact_interval</name>
75 <type>text</type>
76 <comment>Recontact intervals for each status.</comment>
77 <html>
78 <type>TextArea</type>
79 <rows>20</rows>
80 <cols>80</cols>
81 </html>
82 <add>3.3</add>
83 </field>
84
85 <field>
86 <name>instructions</name>
87 <type>text</type>
88 <comment>Script instructions for volunteers to use for the survey.</comment>
89 <html>
90 <type>TextArea</type>
91 <rows>20</rows>
92 <cols>80</cols>
93 </html>
94 <add>3.3</add>
95 </field>
96
97 <field>
98 <name>release_frequency</name>
99 <type>int unsigned</type>
100 <default>NULL</default>
101 <comment>Number of days for recurrence of release.</comment>
102 <add>3.3</add>
103 </field>
104
105 <field>
106 <name>max_number_of_contacts</name>
107 <title>Maximum number of contacts</title>
108 <type>int unsigned</type>
109 <default>NULL</default>
110 <comment>Maximum number of contacts to allow for survey.</comment>
111 <add>3.3</add>
112 </field>
113
114 <field>
115 <name>default_number_of_contacts</name>
116 <title>Default number of contacts</title>
117 <type>int unsigned</type>
118 <default>NULL</default>
119 <comment>Default number of contacts to allow for survey.</comment>
120 <add>3.3</add>
121 </field>
122
123 <field>
124 <name>is_active</name>
125 <type>boolean</type>
126 <default>1</default>
127 <comment>Is this survey enabled or disabled/cancelled?</comment>
128 <add>3.3</add>
129 </field>
130
131 <field>
132 <name>is_default</name>
133 <type>boolean</type>
134 <default>0</default>
135 <comment>Is this default survey?</comment>
136 <add>3.3</add>
137 </field>
138
139 <field>
140 <name>created_id</name>
141 <type>int unsigned</type>
142 <comment>FK to civicrm_contact, who created this Survey.</comment>
143 <add>3.3</add>
144 </field>
145 <foreignKey>
146 <name>created_id</name>
147 <table>civicrm_contact</table>
148 <key>id</key>
149 <add>3.3</add>
150 <onDelete>SET NULL</onDelete>
151 </foreignKey>
152
153 <field>
154 <name>created_date</name>
155 <type>datetime</type>
156 <title>Campaign Created Date</title>
157 <comment>Date and time that Survey was created.</comment>
158 <add>3.3</add>
159 </field>
160
161 <field>
162 <name>last_modified_id</name>
163 <type>int unsigned</type>
164 <comment>FK to civicrm_contact, who recently edited this Survey.</comment>
165 <add>3.3</add>
166 </field>
167 <foreignKey>
168 <name>last_modified_id</name>
169 <table>civicrm_contact</table>
170 <key>id</key>
171 <add>3.3</add>
172 <onDelete>SET NULL</onDelete>
173 </foreignKey>
174
175 <field>
176 <name>last_modified_date</name>
177 <type>datetime</type>
178 <comment>Date and time that Survey was edited last time.</comment>
179 <add>3.3</add>
180 </field>
181
182 <field>
183 <name>result_id</name>
184 <type>int unsigned</type>
185 <default>NULL</default>
186 <comment>Used to store option group id.</comment>
187 <add>3.3</add>
188 </field>
189 <field>
190 <name>bypass_confirm</name>
191 <type>boolean</type>
192 <default>0</default>
193 <comment>Bypass the email verification.</comment>
194 <add>4.2</add>
195 </field>
196 <field>
197 <name>thankyou_title</name>
198 <title>Thank-you Title</title>
199 <type>varchar</type>
200 <length>255</length>
201 <localizable>true</localizable>
202 <comment>Title for Thank-you page (header title tag, and display at the top of the page).</comment>
203 <add>4.2</add>
204 </field>
205 <field>
206 <name>thankyou_text</name>
207 <title>Thank-you Text</title>
208 <type>text</type>
209 <html>
210 <type>TextArea</type>
211 <rows>8</rows>
212 <cols>60</cols>
213 </html>
214 <localizable>true</localizable>
215 <comment>text and html allowed. displayed above result on success page</comment>
216 <add>4.2</add>
217 </field>
218 <field>
219 <name>is_share</name>
220 <title>Is shared through social media</title>
221 <type>boolean</type>
222 <default>1</default>
223 <comment>Can people share the petition through social media?</comment>
224 <add>4.4</add>
225 </field>
226 </table>