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