Difference between revisions of "Custom Fields"
(added bannerZone, pageId field types) |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Page Template Managers Shortcuts}} | ||
Custom fields include new field definitions that can be created on the fly as a tool to allow customization of certain site functions to cater to specific client needs. These fields can be created by administrators and are then available for content managers. | Custom fields include new field definitions that can be created on the fly as a tool to allow customization of certain site functions to cater to specific client needs. These fields can be created by administrators and are then available for content managers. | ||
Line 14: | Line 15: | ||
:this is the suffix that will be used when calling on the field (ex: set to “myField” if you want to access it via “custom_field_myField”). This must follow traditional PHP variable name requirements (must begin with a letter, contain only letters, numbers, underscores). | :this is the suffix that will be used when calling on the field (ex: set to “myField” if you want to access it via “custom_field_myField”). This must follow traditional PHP variable name requirements (must begin with a letter, contain only letters, numbers, underscores). | ||
;Location | ;Location | ||
− | :this dictates where in the administration form the field will display relative to permanent fields. Enter the target field name and the word “before” or “after” to dictate where it will appear relative to the target field | + | :this dictates where in the administration form the field will display relative to permanent fields. Enter the target field name and the word “before” or “after” to dictate where it will appear relative to the target field |
;Title | ;Title | ||
− | :this dictates the description of the field in the administration form. | + | :this dictates the description of the field in the administration form. What is entered here is exactly what the content manager will see adjacent to the field itself, describing the field. HTML is supported in this field. |
;Default | ;Default | ||
:sets the default value of the field. | :sets the default value of the field. | ||
;Settings | ;Settings | ||
− | :controls the field type and attributes. The following field types are available: | + | :controls the field type and attributes. |
+ | :The following field types are available: | ||
+ | |||
+ | {|border=3 | ||
+ | |- | ||
+ | !Field | ||
+ | !Attributes | ||
+ | !Example* | ||
+ | |- | ||
+ | |text | ||
+ | |attributes | ||
+ | |Text:size=20 maxlength=50 | ||
+ | |- | ||
+ | |Radio | ||
+ | |Attributes:value | ||
+ | |Radio:onClick=”function();”:1 | ||
+ | Radio::2 | ||
+ | |- | ||
+ | |Button | ||
+ | |Attributes:value | ||
+ | |Button:onClick=”function();” style=”styledata”:Click me | ||
+ | Button::Click here | ||
+ | |- | ||
+ | |Submit | ||
+ | |Attributes:value | ||
+ | |Submit:onClick=”checkForm();”:submit | ||
+ | Submit::Go! | ||
+ | |- | ||
+ | |Page (modified text field) | ||
+ | Used to allow selection of a page from the page library, includes pop up link to select a page. | ||
+ | |attributes | ||
+ | |Page:size=20 maxlength=50 | ||
+ | |- | ||
+ | |Image (modified text field) | ||
+ | Used to allow selection of an image. Includes link to image library for selection and presentation of selected image below field. | ||
+ | |attributes | ||
+ | |Image:size=20 maxlength=50 | ||
+ | |- | ||
+ | |Password | ||
+ | |Attributes | ||
+ | |Password:size=20 maxlength=50 | ||
+ | |- | ||
+ | |File | ||
+ | Presented file field. If type is “image” than also presents the image itself below the field. | ||
+ | |Attributes:type(image,other) | ||
+ | |File:size=20 maxlength=50:other | ||
+ | |- | ||
+ | |Hidden | ||
+ | |Value | ||
+ | |Hidden:my hidden value | ||
+ | |- | ||
+ | |Checkbox | ||
+ | |Attributes:value | ||
+ | |Checkbox:onClick=”myfunction();”:1 | ||
+ | Checkbox::0 | ||
+ | |- | ||
+ | |Textarea | ||
+ | |Attributes | ||
+ | |Textarea:cols=50 rows=4 | ||
+ | |- | ||
+ | |Select | ||
+ | Options are delimited by colon “:”. Value / Text pairs are delimited by pipe “|” where value is before the pipe, text after. If no pipe is presented BOTH the value and text will be the entered value. | ||
+ | |Attributes:val1[|text1[:val2[|text2]]]… | ||
+ | |Select:size=4:value1|text1:value2|text2 | ||
+ | Select:multiple:valueA:valueB:valueC | ||
+ | Select::1|one:2|two:3|three:4|four | ||
+ | |- | ||
+ | |SepDate | ||
+ | Creates drop downs for month / day / year | ||
+ | |~none~ | ||
+ | |sepdate | ||
+ | |- | ||
+ | |SepDateTime | ||
+ | Creates drop downs for month / day / year hour : minute | ||
+ | |~none~ | ||
+ | |sepdate | ||
+ | |- | ||
+ | |bannerZone | ||
+ | Creates drop down containing all banner zones | ||
+ | |Attributes | ||
+ | |bannerZone:size=5 | ||
+ | |- | ||
+ | |pageId | ||
+ | Creates drop down containing pages | ||
+ | |attributes:templateId List | ||
+ | |pageId:size=3:4,6,22 | ||
+ | |} |
Latest revision as of 01:40, 13 May 2009
|
Custom fields include new field definitions that can be created on the fly as a tool to allow customization of certain site functions to cater to specific client needs. These fields can be created by administrators and are then available for content managers.
Areas of the site the support custom fields
- Users
- (via the user tab in “settings”).
- User custom fields created will be available to apply to all users in the system.
- Pages
- (via “page template management”).
- Page custom field settings will be available to all pages that use the template(s) in which the custom fields are created.
Custom Field Attributes
Each custom field created asks for the following attributes:
- Field Name
- this is the suffix that will be used when calling on the field (ex: set to “myField” if you want to access it via “custom_field_myField”). This must follow traditional PHP variable name requirements (must begin with a letter, contain only letters, numbers, underscores).
- Location
- this dictates where in the administration form the field will display relative to permanent fields. Enter the target field name and the word “before” or “after” to dictate where it will appear relative to the target field
- Title
- this dictates the description of the field in the administration form. What is entered here is exactly what the content manager will see adjacent to the field itself, describing the field. HTML is supported in this field.
- Default
- sets the default value of the field.
- Settings
- controls the field type and attributes.
- The following field types are available:
Field | Attributes | Example* |
---|---|---|
text | attributes | Text:size=20 maxlength=50 |
Radio | Attributes:value | Radio:onClick=”function();”:1
Radio::2 |
Button | Attributes:value | Button:onClick=”function();” style=”styledata”:Click me
Button::Click here |
Submit | Attributes:value | Submit:onClick=”checkForm();”:submit
Submit::Go! |
Page (modified text field)
Used to allow selection of a page from the page library, includes pop up link to select a page. |
attributes | Page:size=20 maxlength=50 |
Image (modified text field)
Used to allow selection of an image. Includes link to image library for selection and presentation of selected image below field. |
attributes | Image:size=20 maxlength=50 |
Password | Attributes | Password:size=20 maxlength=50 |
File
Presented file field. If type is “image” than also presents the image itself below the field. |
Attributes:type(image,other) | File:size=20 maxlength=50:other |
Hidden | Value | Hidden:my hidden value |
Checkbox | Attributes:value | Checkbox:onClick=”myfunction();”:1
Checkbox::0 |
Textarea | Attributes | Textarea:cols=50 rows=4 |
Select
Options are delimited by colon “:”. Value / Text pairs are delimited by pipe “|” where value is before the pipe, text after. If no pipe is presented BOTH the value and text will be the entered value. |
text1[:val2[|text2]]]… | text1:value2|text2
Select:multiple:valueA:valueB:valueC Select::1|one:2|two:3|three:4|four |
SepDate
Creates drop downs for month / day / year |
~none~ | sepdate |
SepDateTime
Creates drop downs for month / day / year hour : minute |
~none~ | sepdate |
bannerZone
Creates drop down containing all banner zones |
Attributes | bannerZone:size=5 |
pageId
Creates drop down containing pages |
attributes:templateId List | pageId:size=3:4,6,22 |