forked from civicrm/civicrm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomField.xml
332 lines (331 loc) · 9.34 KB
/
CustomField.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<?xml version="1.0" encoding="iso-8859-1" ?>
<table>
<base>CRM/Core</base>
<class>CustomField</class>
<name>civicrm_custom_field</name>
<comment>Stores info about an extended (custom) property (data and form field info).</comment>
<add>1.1</add>
<log>true</log>
<labelField>label</labelField>
<field>
<name>id</name>
<type>int unsigned</type>
<title>Custom Field ID</title>
<required>true</required>
<comment>Unique Custom Field ID</comment>
<html>
<type>Number</type>
</html>
<add>1.1</add>
</field>
<primaryKey>
<name>id</name>
<autoincrement>true</autoincrement>
</primaryKey>
<field>
<name>custom_group_id</name>
<type>int unsigned</type>
<title>Custom Group ID</title>
<required>true</required>
<comment>FK to civicrm_custom_group.</comment>
<add>1.1</add>
<pseudoconstant>
<table>civicrm_custom_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
<html>
<type>Select</type>
<label>Custom Group</label>
</html>
</field>
<foreignKey>
<name>custom_group_id</name>
<table>civicrm_custom_group</table>
<key>id</key>
<add>1.1</add>
<onDelete>CASCADE</onDelete>
</foreignKey>
<field>
<name>name</name>
<type>varchar</type>
<title>Custom Field Name</title>
<length>64</length>
<comment>Variable name/programmatic handle for this field.</comment>
<add>3.3</add>
</field>
<field>
<name>label</name>
<type>varchar</type>
<title>Custom Field Label</title>
<length>255</length>
<required>true</required>
<localizable>true</localizable>
<comment>Text for form field label (also friendly name for administering this custom property).</comment>
<add>1.1</add>
</field>
<field>
<name>data_type</name>
<type>varchar</type>
<title>Data Type</title>
<length>16</length>
<required>true</required>
<comment>Controls location of data storage in extended_data table.</comment>
<pseudoconstant>
<callback>CRM_Core_BAO_CustomField::dataType</callback>
</pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<label>Data Type</label>
</html>
</field>
<field>
<name>html_type</name>
<type>varchar</type>
<title>HTML Type</title>
<length>32</length>
<required>true</required>
<comment>HTML types plus several built-in extended types.</comment>
<pseudoconstant>
<callback>CRM_Core_SelectValues::customHtmlType</callback>
</pseudoconstant>
<html>
<type>Select</type>
<label>Field Input Type</label>
</html>
<add>1.1</add>
</field>
<field>
<name>default_value</name>
<type>varchar</type>
<title>Custom Field Default</title>
<length>255</length>
<comment>Use form_options.is_default for field_types which use options.</comment>
<add>1.1</add>
</field>
<field>
<name>is_required</name>
<title>Custom Field Is Required?</title>
<type>boolean</type>
<comment>Is a value required for this property.</comment>
<default>0</default>
<add>1.1</add>
</field>
<field>
<name>is_searchable</name>
<title>Allow Searching on Field?</title>
<type>boolean</type>
<comment>Is this property searchable.</comment>
<default>0</default>
<add>1.1</add>
</field>
<field>
<name>is_search_range</name>
<type>boolean</type>
<title>Search as a Range</title>
<comment>Is this property range searchable.</comment>
<add>1.4</add>
<default>0</default>
</field>
<field>
<name>weight</name>
<type>int</type>
<title>Order</title>
<required>true</required>
<default>1</default>
<comment>Controls field display order within an extended property group.</comment>
<add>1.1</add>
</field>
<field>
<name>help_pre</name>
<type>text</type>
<title>Custom Field Pre Text</title>
<localizable>true</localizable>
<comment>Description and/or help text to display before this field.</comment>
<add>1.1</add>
</field>
<field>
<name>help_post</name>
<type>text</type>
<title>Custom Field Post Text</title>
<localizable>true</localizable>
<comment>Description and/or help text to display after this field.</comment>
<add>1.1</add>
</field>
<field>
<name>mask</name>
<type>varchar</type>
<title>Custom Field Formatting</title>
<length>64</length>
<comment>Optional format instructions for specific field types, like date types.</comment>
<add>1.1</add>
</field>
<field>
<name>attributes</name>
<type>varchar</type>
<title>Custom Field Attributes</title>
<length>255</length>
<comment>Store collection of type-appropriate attributes, e.g. textarea needs rows/cols attributes</comment>
<add>1.1</add>
</field>
<field>
<name>javascript</name>
<type>varchar</type>
<title>Custom Field Javascript</title>
<length>255</length>
<comment>Optional scripting attributes for field.</comment>
<add>1.1</add>
</field>
<field>
<name>is_active</name>
<type>boolean</type>
<title>Custom Field Is Active?</title>
<comment>Is this property active?</comment>
<default>1</default>
<add>1.1</add>
</field>
<field>
<name>is_view</name>
<type>boolean</type>
<title>Field is Viewable</title>
<default>0</default>
<comment>Is this property set by PHP Code? A code field is viewable but not editable</comment>
<add>1.1</add>
</field>
<field>
<name>options_per_line</name>
<type>int unsigned</type>
<title>Field Options Per Line</title>
<comment>number of options per line for checkbox and radio</comment>
</field>
<field>
<name>text_length</name>
<type>int unsigned</type>
<title>Field Length</title>
<comment>field length if alphanumeric</comment>
<add>2.2</add>
</field>
<field>
<name>start_date_years</name>
<type>int</type>
<title>Field Start Date</title>
<comment>Date may be up to start_date_years years prior to the current date.</comment>
<add>1.4</add>
</field>
<field>
<name>end_date_years</name>
<type>int</type>
<title>Field End Date</title>
<comment>Date may be up to end_date_years years after the current date.</comment>
<add>1.4</add>
</field>
<field>
<name>date_format</name>
<type>varchar</type>
<title>Field Data Format</title>
<length>64</length>
<comment>date format for custom date</comment>
<add>3.1</add>
<pseudoconstant>
<callback>CRM_Core_SelectValues::getDatePluginInputFormats</callback>
</pseudoconstant>
</field>
<field>
<name>time_format</name>
<type>int unsigned</type>
<title>Field Time Format</title>
<comment>time format for custom date</comment>
<add>3.1</add>
<pseudoconstant>
<callback>CRM_Core_SelectValues::getTimeFormats</callback>
</pseudoconstant>
</field>
<field>
<name>note_columns</name>
<type>int unsigned</type>
<title>Field Note Columns</title>
<comment>Number of columns in Note Field</comment>
<add>1.4</add>
</field>
<field>
<name>note_rows</name>
<type>int unsigned</type>
<title>Field Note Rows</title>
<comment>Number of rows in Note Field</comment>
<add>1.4</add>
</field>
<field>
<name>column_name</name>
<type>varchar</type>
<title>Field Column Name</title>
<length>255</length>
<comment>Name of the column that holds the values for this field.</comment>
<add>2.0</add>
</field>
<field>
<name>option_group_id</name>
<type>int unsigned</type>
<title>Field Option Group ID</title>
<comment>For elements with options, the option group id that is used</comment>
<html>
<label>Field Option Group</label>
</html>
<add>1.4</add>
<pseudoconstant>
<table>civicrm_option_group</table>
<keyColumn>id</keyColumn>
<labelColumn>title</labelColumn>
</pseudoconstant>
</field>
<foreignKey>
<name>option_group_id</name>
<table>civicrm_option_group</table>
<key>id</key>
<add>5.6</add>
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
<name>serialize</name>
<type>int unsigned</type>
<title>Serialize</title>
<length>255</length>
<comment>Serialization method - a non-zero value indicates a multi-valued field.</comment>
<pseudoconstant>
<callback>CRM_Core_SelectValues::fieldSerialization</callback>
</pseudoconstant>
<add>5.27</add>
<required>true</required>
<default>0</default>
</field>
<field>
<name>filter</name>
<type>varchar</type>
<title>Field Filter</title>
<length>255</length>
<comment>Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.</comment>
<add>4.1</add>
</field>
<field>
<name>in_selector</name>
<type>boolean</type>
<title>Field Display</title>
<default>0</default>
<comment>Should the multi-record custom field values be displayed in tab table listing</comment>
<add>4.5</add>
</field>
<index>
<name>UI_label_custom_group_id</name>
<fieldName>label</fieldName>
<fieldName>custom_group_id</fieldName>
<unique>true</unique>
<add>1.1</add>
</index>
<index>
<name>UI_name_custom_group_id</name>
<fieldName>name</fieldName>
<fieldName>custom_group_id</fieldName>
<unique>true</unique>
<add>4.3</add>
</index>
</table>