Merge pull request #19146 from JMAConsulting/issue-2174
[civicrm-core.git] / xml / schema / Price / PriceField.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Price</base>
5 <class>PriceField</class>
6 <name>civicrm_price_field</name>
7 <add>1.8</add>
8 <log>true</log>
9 <component>CiviContribute</component>
10 <field>
11 <name>id</name>
12 <title>Price Field ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Price Field</comment>
16 <add>1.8</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>price_set_id</name>
24 <title>Price Set</title>
25 <type>int unsigned</type>
26 <required>true</required>
27 <comment>FK to civicrm_price_set</comment>
28 <pseudoconstant>
29 <table>civicrm_price_set</table>
30 <keyColumn>id</keyColumn>
31 <nameColumn>name</nameColumn>
32 <labelColumn>title</labelColumn>
33 </pseudoconstant>
34 <add>1.8</add>
35 </field>
36 <foreignKey>
37 <name>price_set_id</name>
38 <table>civicrm_price_set</table>
39 <key>id</key>
40 <add>1.8</add>
41 </foreignKey>
42 <field>
43 <name>name</name>
44 <type>varchar</type>
45 <title>Name</title>
46 <length>255</length>
47 <required>true</required>
48 <comment>Variable name/programmatic handle for this field.</comment>
49 <add>1.8</add>
50 <html>
51 <type>Text</type>
52 </html>
53 </field>
54 <index>
55 <name>index_name</name>
56 <fieldName>name</fieldName>
57 <add>1.8</add>
58 </index>
59 <field>
60 <name>label</name>
61 <type>varchar</type>
62 <title>Label</title>
63 <length>255</length>
64 <required>true</required>
65 <localizable>true</localizable>
66 <comment>Text for form field label (also friendly name for administering this field).</comment>
67 <html>
68 <type>Text</type>
69 </html>
70 <add>1.8</add>
71 </field>
72 <field>
73 <name>html_type</name>
74 <type>varchar</type>
75 <length>12</length>
76 <required>true</required>
77 <pseudoconstant>
78 <callback>CRM_Price_BAO_PriceField::htmlTypes</callback>
79 </pseudoconstant>
80 <add>1.8</add>
81 <html>
82 <type>Select</type>
83 </html>
84 </field>
85 <field>
86 <name>is_enter_qty</name>
87 <title>Price Field Quantity Required?</title>
88 <type>boolean</type>
89 <default>0</default>
90 <comment>Enter a quantity for this field?</comment>
91 <add>1.8</add>
92 <html>
93 <type>CheckBox</type>
94 </html>
95 </field>
96 <field>
97 <name>help_pre</name>
98 <title>Price Field Pre Text</title>
99 <type>text</type>
100 <localizable>true</localizable>
101 <comment>Description and/or help text to display before this field.</comment>
102 <html>
103 <type>TextArea</type>
104 <rows>4</rows>
105 <cols>80</cols>
106 </html>
107 <add>1.8</add>
108 </field>
109 <field>
110 <name>help_post</name>
111 <title>Price Field Post Text</title>
112 <type>text</type>
113 <localizable>true</localizable>
114 <comment>Description and/or help text to display after this field.</comment>
115 <html>
116 <type>TextArea</type>
117 <rows>4</rows>
118 <cols>80</cols>
119 </html>
120 <add>1.8</add>
121 </field>
122 <field>
123 <name>weight</name>
124 <title>Order</title>
125 <type>int</type>
126 <default>1</default>
127 <comment>Order in which the fields should appear</comment>
128 <add>1.8</add>
129 <html>
130 <type>Select</type>
131 </html>
132 </field>
133 <field>
134 <name>is_display_amounts</name>
135 <title>Price Field Show Amounts?</title>
136 <type>boolean</type>
137 <default>1</default>
138 <comment>Should the price be displayed next to the label for each option?</comment>
139 <html>
140 <type>CheckBox</type>
141 </html>
142 </field>
143 <field>
144 <name>options_per_line</name>
145 <title>Price Field Options per Row</title>
146 <type>int unsigned</type>
147 <default>1</default>
148 <comment>number of options per line for checkbox and radio</comment>
149 <add>1.8</add>
150 <html>
151 <type>Text</type>
152 </html>
153 </field>
154 <field>
155 <name>is_active</name>
156 <title>Price Field Is Active?</title>
157 <type>boolean</type>
158 <comment>Is this price field active</comment>
159 <default>1</default>
160 <add>1.8</add>
161 <html>
162 <type>CheckBox</type>
163 </html>
164 </field>
165 <field>
166 <name>is_required</name>
167 <title>Price Field is Required?</title>
168 <type>boolean</type>
169 <comment>Is this price field required (value must be > 1)</comment>
170 <default>1</default>
171 <add>1.8</add>
172 <html>
173 <type>CheckBox</type>
174 </html>
175 </field>
176 <field>
177 <name>active_on</name>
178 <title>Price Field Start Date</title>
179 <type>datetime</type>
180 <default>NULL</default>
181 <comment>If non-zero, do not show this field before the date specified</comment>
182 <add>1.8</add>
183 <html>
184 <type>Select Date</type>
185 <formatType>activityDateTime</formatType>
186 </html>
187 </field>
188 <field>
189 <name>expire_on</name>
190 <title>Price Field End Date</title>
191 <type>datetime</type>
192 <default>NULL</default>
193 <comment>If non-zero, do not show this field after the date specified</comment>
194 <add>1.8</add>
195 <html>
196 <type>Select Date</type>
197 <formatType>activityDateTime</formatType>
198 </html>
199 </field>
200 <field>
201 <name>javascript</name>
202 <title>Price Field Javascript</title>
203 <type>varchar</type>
204 <length>255</length>
205 <comment>Optional scripting attributes for field</comment>
206 <add>1.8</add>
207 <html>
208 <type>Text</type>
209 </html>
210 </field>
211 <field>
212 <name>visibility_id</name>
213 <title>Price Field Visibility</title>
214 <type>int unsigned</type>
215 <default>1</default>
216 <comment>Implicit FK to civicrm_option_group with name = 'visibility'</comment>
217 <add>3.2</add>
218 <pseudoconstant>
219 <optionGroupName>visibility</optionGroupName>
220 </pseudoconstant>
221 <html>
222 <type>Select</type>
223 </html>
224 </field>
225 </table>