Jump to content

ATK Attribute Flags: Difference between revisions

From NusaATK
Restored the original ATK doc page that has been destroyed by Wayne with its unofficial 7.0 changes
 
(4 intermediate revisions by one other user not shown)
Line 5: Line 5:
Example:
Example:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$this->add(new atkAttribute("name", AF_SEARCHABLE|AF_OBLIGATORY));
$this->add(new atkAttribute("name", AF_SEARCHABLE));
</syntaxhighlight>
</syntaxhighlight>


Line 12: Line 12:
This is a list of flags that are common to all attributes. (some attributes have additional flags)
This is a list of flags that are common to all attributes. (some attributes have additional flags)


;(atkattribute ) AF_OBLIGATORY: Value must be entered  
;AF_OBLIGATORY: Field is required. A value must be entered by the user.
;(atkattribute ) AF_UNIQUE: Value must be unique  
;AF_UNIQUE: The value entered by the user must be unique.
;(atkattribute ) AF_PRIMARY| AF_OBLIGATORY: Part of the primary-key node, also makes it obligatory
;AF_PRIMARY: This attribute is (part of) the primary key of the table represented by the node.
;(atkattribute ) AF_AUTO_INCREMENT: Auto-increment field
;AF_AUTO_INCREMENT: The attribute value is incremented automatically for each newly added record.
;(atkattribute ) AF_AUTOINCREMENT = AF_AUTO_INCREMENT: (Alias for AF_AUTO_INCREMENT (auto-increment flag is often mistyped)
;AF_AUTOINCREMENT: This flag is an alias to AF_AUTO_INCREMENT and is identical in every way.
;(atkattribute ) AF_HIDE_LIST: Don't show in record lists hide flag
;AF_AUTOKEY: Indicates that the attribute is a hidden, autoincremented primary key. (This is actually an alias for AF_AUTOINCREMENT|AF_PRIMARY|AF_HIDE.)
;(atkattribute ) AF_HIDE_ADD: Don't show on add pages hide flag
;AF_HIDE_LIST: The attribute is hidden in record lists.
;(atkattribute ) AF_HIDE_EDIT: Don't show on edit pages hide flag
;AF_HIDE_ADD: The attribute is hidden in add-forms.
;(atkattribute ) AF_HIDE_SELECT: Don't show on select pages hide flag
;AF_HIDE_EDIT: The attribute is hidden in edit-forms.
;(atkattribute ) AF_HIDE_VIEW: Don't show on view pages hide flag
;AF_HIDE_SELECT: The attribute is hidden in select-pages.
;(atkattribute ) AF_HIDE_SEARCH: Not searchable in extended search
;AF_HIDE_VIEW: The attribute is hidden in view-pages.
;(atkattribute ) AF_FORCE_LOAD: Normally, when an attribute is hidden, its value is not loaded from the database. Sometimes however you need the value, even though it is hidden (for example to influence the display of another attribute). In this case, the AF_FORCE_LOAD flag will ensure that the attribute value is always loaded, regardless of whether it's hidden or not.
;AF_HIDE_SEARCH: The attribute is hidden in extended search pages.
;(atkattribute ) AF_HIDE = AF_HIDE_EDIT | AF_HIDE_ADD | AF_HIDE_LIST | AF_HIDE_SEARCH | AF_HIDE_VIEW | AF_HIDE_SELECT:  Attribute is always hidden. Note that this will typically cause the attribute not to be loaded and not available in $record;( if this is undesirable add the flag AF_FORCE_LOAD)
;AF_HIDE: Attribute is always hidden. Note that this will typically cause the attribute not to be loaded and not available in $record; if this is undesirable add the flag AF_FORCE_LOAD (see below).
;(atkattribute ) AF_READONLY_ADD:  Readonly in add
;AF_FORCE_LOAD: Normally, when an attribute is hidden, its value is not loaded from the database. Sometimes however you need the value, even though it is hidden (for example to influence the display of another attribute). In this case, the AF_FORCE_LOAD flag will ensure that the attribute value is always loaded, regardless of whether it's hidden or not.
;(atkattribute ) AF_READONLY_EDIT: Readonly when edited
;AF_READONLY_ADD: In add-pages, the attribute is read-only.
;(atkattribute ) AF_READONLY = AF_READONLY_EDIT | AF_READONLY_ADD:  Always readonly
;AF_READONLY_EDIT: In edit-pages, the attribute is read-only.
;(atkattribute ) AF_NO_LABEL:  Don't display the attribute name as a label in front of the attribute. The attribute is displayed directly at the position the label would normally be.
;AF_READONLY: The attribute is read-only in both edit- and add-pages.
;(atkattribute ) AF_NOLABEL = AF_NO_LABEL: No label in forms
;AF_NO_LABEL: Don't display the attribute name as a label in front of the attribute. The attribute is displayed directly at the position the label would normally be.
;(atkattribute ) AF_BLANK_LABEL: Don't display the attribute name as a label in front of the attribute. The difference with AF_NO_LABEL is that with this flag the label is replaced with empty space, leaving the attribute itself at its original position.
;AF_NOLABEL: This flag is an alias to AF_NO_LABEL and is identical in every way.
;(atkattribute ) AF_BLANKLABEL = AF_BLANK_LABEL:  Blank label in forms
;AF_BLANK_LABEL: Don't display the attribute name as a label in front of the attribute. The difference with AF_NO_LABEL is that with this flag the label is replaced with empty space, leaving the attribute itself at its original position.
;(atkattribute ) AF_NO_SORT: Cannot be sorted in recordlists.
;AF_BLANKLABEL: This flag is an alias to AF_BLANK_LABEL and is identical in every way.
;(atkattribute ) AF_NOSORT = AF_NO_SORT: Cannot be sorted in recordlists
;AF_NO_SORT: In recordlist, the column for this attribute is not sortable by the user.
;(atkattribute ) AF_SEARCHABLE: Attribute is searchable in list views
;AF_NOSORT: This flag is an alias to AF_NO_SORT and is identical in every way.
;(atkattribute ) AF_TOTAL: In recordlists, the column for this attribute is automatically totalized, and the total is displayed in an extra row right under the recordlist.
;AF_SEARCHABLE: This attribute is searchable through the quick-search bar in recordlists.
;(atkattribute ) AF_POPUP: Attributes that support this flag, like the atkFileAttribute, open a popup instead of showing their contents directly in the recordlist.
;AF_TOTAL: In recordlists, the column for this attribute is automatically totalized, and the total is displayed in an extra row right under the recordlist.
;(atkattribute ) AF_CASCADE_DELETE ): Attributes that support cascade deletes, like the atkOneToManyRelation, will perform delete functionality when this flag is set and a record is deleted.
;AF_POPUP: Attributes that support this flag, like the [[atkFileAttribute]], open a popup instead of showing their contents directly in the recordlist.
;(atkattribute ) AF_LARGE: Attributes that support this flag use this flag as a hint that a large number of records will need to be processed. The atkManyToOneRelation uses this flag to prevent dropdowns with too many records.
;AF_CASCADE_DELETE: Attributes that support cascade deletes, like the [[atkOneToManyRelation]], will perform delete functionality when this flag is set and a record is deleted.
;(atkattribute ) AF_NO_FILTER: Attributes that support this flag, like the atkManyToOneRelation, will use this flag to determine whether filters on related nodes should be executed.
;AF_LARGE: Attributes that support this flag use this flag as a hint that a large number of records will need to be processed. The [[atkManyToOneRelation]] uses this flag to prevent dropdowns with too many records.
;(atkattribute ) AF_PARENT: When using an atkTreeNode instead of atkNode, this flag tells the node that the attribute is the foreign key in the parent/child relation
;AF_NO_FILTER: Attributes that support this flag, like the atkManyToOneRelation, will use this flag to determine whether filters on related nodes should be executed.
;(atkattribute ) AF_NO_QUOTES: No quotes are used when adding to database
;AF_PARENT: When using an [[atkTreeNode]] instead of [[atkNode]], this flag tells the node that the attribute is the foreign key in the parent/child relation. (Note: the atkTreeNode is not available in the ATK-light version that ships with [[Achievo]].)
;(atkattribute ) AF_ML: Multi-language field
;AF_NO_QUOTES: Atk puts quotes around field values when storing them in the database. Use this flag to indicate that it shouldn't use quotes. This is useful when the value should be treated as a SQL expression instead of a value.
;(atkattribute ) AF_MULTILANGUAGE = AF_ML:  Indicates which attribute is used to store the languagecode. Used in combination with NF_MULTILANGUAGE
;AF_MULTILANGUAGE (alias for AF_ML): Indicates which attribute is used to store the languagecode. Used in combination with NF_MULTILANGUAGE. Howto: [[Multilanguage_node]] (Note: this functionality is not available in the ATK-light version that ships with Achievo.).
;(atkattribute ) AF_AUTOKEY = AF_PRIMARY | AF_HIDE |AF_AUTOINCREMENT: Shortcut for hidden auto-incremented primary key
 
;(atkboolattribute ) AF_BOOL_OBLIGATORY: Normally a atkBoolAttribute is not flagged obligatory, and if the standard AF_OBLIGATORY flag is set it is automatically removed when the attribute is constructed. If you really really really wants to show this attribute as obligatory, use this flag.
==Attribute specific flags==
;(atkboolattribute ) AF_BOOL_INLINE_LABEL:  Show an extra label right next to the checkbox. ATK searches the language file for the following variants <attribute>_label, <attribute> (next to the module/node prefixes). Don't forget to add the AF_BLANK_LABEL flag if you don't want to show the normal label.
 
;(atkboolattribute ) AF_BOOL_DISPLAY_CHECKBOX: Display checkbox in view / list mode instead of "yes" or "no".
===[[atkBoolAttribute]]===
;(atkdateattribute ) AF_DATE_STRING:  Date must be entered as a string, instead of using the date-selection dropdowns. Any string accepted by the php function strtotime is valid input when this flag is set.
;AF_BOOL_OBLIGATORY: Normally a atkBoolAttribute is not flagged obligatory, and if the standard AF_OBLIGATORY flag is set it is automatically removed when the attribute is constructed. If you really really really wants to show this attribute as obligatory, use this flag.
;(atkdateattribute ) AF_DATE_EMPTYFIELD With this flag set, it is possible for the user to select a null-date.
 
;(atkdateattribute ) AF_DATE_NO_CALENDAR:  Do not append the popup calendar.
;AF_BOOL_INLINE_LABEL: Show an extra label right next to the checkbox. ATK searches the language file for the following variants <attribute>_label, <attribute> (next to the module/node prefixes). Don't forget to add the AF_BLANK_LABEL flag if you don't want to show the normal label.
;(atkdateattribute ) AF_DATE_DISPLAY_DAY:  Show the day of the week in the display
 
;(atkdateattribute ) AF_DATE_EDIT_NO_DAY: Don't display the day of the week in edit mode
;AF_BOOL_DISPLAY_CHECKBOX: Display checkbox in view / list mode instead of "yes" or "no".
;(atkdateattribute ) AF_CLEAR_TOUCH_BUTTONS:  Display buttons to clear and 'touch' date
 
;(atkdatetimeattribute ) AF_CLEAR_TOUCH_BUTTONS: Display buttons to clear and 'touch' date
===[[atkDateAttribute]]===
;(atkdummyattribute ) AF_DUMMY_SHOW_LABEL: Make the attribute label its field. Use the flag AF_NOLABEL if you want to start at the beginning of the line.
 
;(atkdurationattribute ) AF_DURATION_STRING: Date must be entered as an english date string (strtotime)
;AF_DATE_STRING: Date must be entered as a string, instead of using the date-selection dropdowns. Any string accepted by the php function strtotime is valid input when this flag is set.
;(atkfileattribute ) AF_FILE_NO_UPLOAD:  Disable uploading of files
;AF_DATE_EMPTYFIELD: With this flag set, it is possible for the user to select a null-date.
;(atkfileattribute ) AF_FILE_NO_SELECT:  Disable the dropdown to select existing files. If this flag is set, the user can only upload a new file or keep the existing one.
 
;(atkfileattribute ) AF_FILE_NO_DELETE: Remove the ability to delete the files (from the database. The physical file is never removed, unless the AF_FILE_PHYSICAL_DELETE flag is set).
===[[atkDummyAttribute]]===
;(atkfileattribute ) AF_FILE_NO_AUTOPREVIEW: By default, the atkFileAttribute tries to determine the filetype of the uploaded file, and if it's an image, display the image. If this flag is set, the detection is turned off and images are not displayed.
 
;(atkfileattribute ) AF_FILE_PHYSICAL_DELETE: If the file is removed from the database, the physical file is also removed from the server.
;AF_DUMMY_SHOW_LABEL: This flag makes the dummy have a label, just like other attributes.
;(atkfileattribute ) AF_FILE_POPUP AF_POPUP:  Instead of directly displaying the image, the attribute will display a link to a popup, if this flag is set
 
;(atkipattribute ) AF_IP_ALLOW_WILDCARDS:  Allow *
===[[atkFileAttribute]]===
;(atkipattribute ) AF_IP_STORENUMERIC:  Store as numeric value
 
;(atkipattribute ) AF_IP_SINGLEFIELD: Single field xxx.xxx.xxx.xxx instead of deault 4 fields xxx xxx xxx xxx
;AF_FILE_NO_UPLOAD: Remove the ability to upload new files.
;(atklistattribute ) AF_NO_TRANSLATION:  Do not translate the options
;AF_FILE_NO_SELECT: Disable the dropdown to select existing files. If this flag is set, the user can only upload a new file or keep the existing one.
;(atklistattribute ) AF_LIST_NO_OBLIGATORY_NULL_ITEM:  Do not add a default null option.
;AF_FILE_NO_DELETE: Remove the ability to delete the files (from the database. The physical file is never removed, unless the AF_FILE_PHYSICAL_DELETE flag is set).
;(atklistattribute ) AF_LIST_NO_NULL_ITEM:  Do not add null option ever
;AF_FILE_PHYSICAL_DELETE: If the file is removed from the database, the physical file is also removed from the server.
;(atklistattribute ) AF_LIST_OBLIGATORY_NULL_ITEM: Add a default null option to obligatory items
;AF_FILE_NO_AUTOPREVIEW: By default, the atkFileAttribute tries to determine the filetype of the uploaded file, and if it's an image, display the image. If this flag is set, the detection is turned off and images are not displayed.
;(atklivetextpreview AF_LIVETEXT_SHOWLABEL = AF_DUMMY_SHOW_LABEL: Label the preview
;AF_FILE_POPUP: Instead of directly displaying the image, the attribute will display a link to a popup, if this flag is set.
;(atklivetextpreview AF_LIVETEXT_NL2BR: “nl2br” the data before display
 
;(atkmultiselectattribute ) AF_NO_TOGGLELINKS:   ????
===[[atkPasswordAttribute]]===
;(atkmultiselectattribute ) AF_CHECK_ALL:   ????
 
;(atkmultiselectattribute ) AF_LINKS_BOTTOM:   ????
;AF_PASSWORD_NO_VALIDATE: By default, to change a password, the user must also enter the current password. If this flag is set, entering the current password is not necessary (useful for edit-screens where administrators must manage useraccounts and need to change users' passwords).
;(atkpasswordattribute ) AF_PASSWORD_NOVALIDATE:  Disables password check when editing password field
;AF_PASSWORD_NOVALIDATE: This flag is an alias to AF_PASSWORD_NO_VALIDATE and is identical in every way.
;(atkpasswordattribute ) AF_PASSWORD_NO_VALIDATE: By default, to change a password, the user must also enter the current password. If this flag is set, entering the current password is not necessary (useful for edit-screens where administrators must manage useraccounts and need to change users' passwords).
 
;(atkpasswordattribute ) AF_PASSWORD_NOVALIDATE  = AF_PASSWORD_NO_VALIDATE:  By default, to change a password, the user must also enter the current password. If this flag is set, entering the current password is not necessary (useful for edit-screens where administrators must manage useraccounts and need to change users' passwords).
===[[atkListAttribute]]===
;(atkpasswordattribute ) AF_PASSWORD_NO_ENCODE:  Don’t encode (with md5)
;AF_NO_TRANSLATION: Do not translate the options
;(atkradioattribute ) AF_DISPLAY_VERT:  Displays the set of radio buttons vertically instead of horizontal default
;AF_LIST_NO_OBLIGATORY_NULL_ITEM: Do not add a default null option.
;(atktabbedpane AF_TABBEDPANE_NO_AUTO_HIDE_LABEL: Do not hide attribute label when it is single on the tab
;AF_LIST_NO_NULL_ITEM: Do not add null option ever
;(atktimeattribute ) AF_TIME_SECONDS:  Display seconds after hours & minutes
;AF_LIST_OBLIGATORY_NULL_ITEM: Add a default null option to obligatory items
;(atktimeattribute ) AF_CLEAR_TOUCH_BUTTONS:  Display buttons to clear and 'touch' date
 
;(atkurlattribute ) AF_URL_ALLOWWRAP:  Add one space after each "/", "?" and "&" to fit a (long) url into <td></td>.
===[[atkRadioAttribute]]===
;(atkurlattribute ) AF_URL_STRIPHTTP:  Don't display "http://". Link remains intact.
 
;(atkweekdayattribute ) AF_WEEKDAY_SMALL_EDIT:  ????
;AF_DISPLAY_VERT: Align the options vertically instead of horizontally.
 
===[[atkManyToOneRelation]]===
 
;AF_RELATION_AUTOLINK: If this flag is set, the edit-dropdown will have 2 additional links; one to edit the currently selected record, and one to add a new record to the dropdown. When displaying the attribute, for example in recordlists, the displayed value is automatically displayed as a link to the view-page of the seleted record.
 
;AF_RELATION_NO_NULL_ITEM: If this flag is set, and $config_list_obligatory_null_item is set to true, to prevent relations from selecting a default record, then this will remove that null item for the relation that has this flag.
 
;AF_MANYTOONE_OBLIGATORY_NULL_ITEM: When AF_OBLIGATORY is used, this makes sure that the first option of the drop down list is set to "none". May be handy if onChange event is set on relation.
 
 
;AF_RELATION_AUTOCOMPLETE: Instead of a dropdown, the user is presented with a text box that features autocompletion when typing.
 
;AF_MANYTOONE_LAZY: By default, when loading records in a node, the destination record of manytoonerelations is loaded directly with the main query. When this flag is set, it is only loaded when it is needed in an edit screen.
 
===[[atkOneToOneRelation]]===
 
;AF_ONETOONE_INTEGRATE: If a node has a onetoone relationship with another node, the edit fields of the other node are indented slightly to indicate that they belong to the other node. If the AF_ONETOONE_INTEGRATE flag is set, the other nodes' edit fields are displayed in such a manner that it is invisible to the user that they are part of another node. The user sees the entire edit-page as if all fields belonged to the same node.
 
;AF_ONETOONE_ERROR: For backwardscompatibility reasons, the atkOneToOneRelation does not validate input of the destination node. If this flag is set, validation is done.
 
;AF_ONETOONE_ADD: Override the default no add flag.
 
;AF_ONETOONE_LAZY: Use lazy loading instead of query addition.
 
;AF_ONETOONE_RESPECT_TABS: Respects tab/sections that have been assigned to this attribute instead of using the tabs assigned for the attributes in the destination node. This flag is only useful in integration mode.
 
===[[atkOneToManyRelation]]===
 
;AF_RESTRICTED_DELETE: Only allow deletion of master item when there are no child records.
 
;AF_ONETOMANY_ADD_DIALOG: Use pop-up dialog for adding records instead of a new page.
 
;AF_ONETOMANY_EMBED: If this flag is set, the 'add' form for new child records is loaded inline, rather than in a new page.<br />
Deprecated: Replaced by AF_ONETOMANY_ADD_DIALOG.
 
;AF_ONETOMANY_ADDORCOPY_DIALOG: Use pop-up dialog for whatever a new record must be copied or must be added.
 
;AF_ONETOMANY_SHOW_ADD: Using this flag it's possible to use the atkOneToManyRelation when you still need to add the master record. The detail records will be temporarily stored in the session until the master record is added.<br />
WARNING: Not on by default because this only works in simple cases, not having an id will lead to strange results for:
* Nodes that use the foreign key in their descriptor
* Nodes with unique records (AF_UNIQUE always just checks the database)
* Combined primary keys
 
===[[atkManyBoolRelation]]===
 
;AF_MANYBOOL_NO_TOOLBAR: Hides the 'Select All/Select None/Invert Selection' toolbar.
 


<div style="border:1px solid orange;width:90%;background-color:#FFFACD;padding:7px;margin-bottom:0.5em;margin-top:20px;">
<div style="border:1px solid orange;width:90%;background-color:#FFFACD;padding:7px;margin-bottom:0.5em;margin-top:20px;">
[[ATK Attribute Flags]] | [[Module Flags]] | [[Node Flags]]
[[ATK Attribute Flags]] | [[Module Flags]] | [[Node Flags]]
</div>
</div>

Latest revision as of 17:29, 2 April 2015

Intro

Most attributes have a $flags param in the constructor. You can pass multiple flags by concatenating them with a pipe symbol (|).

Example:

$this->add(new atkAttribute("name", AF_SEARCHABLE));

Available flags for all attributes

This is a list of flags that are common to all attributes. (some attributes have additional flags)

AF_OBLIGATORY
Field is required. A value must be entered by the user.
AF_UNIQUE
The value entered by the user must be unique.
AF_PRIMARY
This attribute is (part of) the primary key of the table represented by the node.
AF_AUTO_INCREMENT
The attribute value is incremented automatically for each newly added record.
AF_AUTOINCREMENT
This flag is an alias to AF_AUTO_INCREMENT and is identical in every way.
AF_AUTOKEY
Indicates that the attribute is a hidden, autoincremented primary key. (This is actually an alias for AF_AUTOINCREMENT|AF_PRIMARY|AF_HIDE.)
AF_HIDE_LIST
The attribute is hidden in record lists.
AF_HIDE_ADD
The attribute is hidden in add-forms.
AF_HIDE_EDIT
The attribute is hidden in edit-forms.
AF_HIDE_SELECT
The attribute is hidden in select-pages.
AF_HIDE_VIEW
The attribute is hidden in view-pages.
AF_HIDE_SEARCH
The attribute is hidden in extended search pages.
AF_HIDE
Attribute is always hidden. Note that this will typically cause the attribute not to be loaded and not available in $record; if this is undesirable add the flag AF_FORCE_LOAD (see below).
AF_FORCE_LOAD
Normally, when an attribute is hidden, its value is not loaded from the database. Sometimes however you need the value, even though it is hidden (for example to influence the display of another attribute). In this case, the AF_FORCE_LOAD flag will ensure that the attribute value is always loaded, regardless of whether it's hidden or not.
AF_READONLY_ADD
In add-pages, the attribute is read-only.
AF_READONLY_EDIT
In edit-pages, the attribute is read-only.
AF_READONLY
The attribute is read-only in both edit- and add-pages.
AF_NO_LABEL
Don't display the attribute name as a label in front of the attribute. The attribute is displayed directly at the position the label would normally be.
AF_NOLABEL
This flag is an alias to AF_NO_LABEL and is identical in every way.
AF_BLANK_LABEL
Don't display the attribute name as a label in front of the attribute. The difference with AF_NO_LABEL is that with this flag the label is replaced with empty space, leaving the attribute itself at its original position.
AF_BLANKLABEL
This flag is an alias to AF_BLANK_LABEL and is identical in every way.
AF_NO_SORT
In recordlist, the column for this attribute is not sortable by the user.
AF_NOSORT
This flag is an alias to AF_NO_SORT and is identical in every way.
AF_SEARCHABLE
This attribute is searchable through the quick-search bar in recordlists.
AF_TOTAL
In recordlists, the column for this attribute is automatically totalized, and the total is displayed in an extra row right under the recordlist.
AF_POPUP
Attributes that support this flag, like the atkFileAttribute, open a popup instead of showing their contents directly in the recordlist.
AF_CASCADE_DELETE
Attributes that support cascade deletes, like the atkOneToManyRelation, will perform delete functionality when this flag is set and a record is deleted.
AF_LARGE
Attributes that support this flag use this flag as a hint that a large number of records will need to be processed. The atkManyToOneRelation uses this flag to prevent dropdowns with too many records.
AF_NO_FILTER
Attributes that support this flag, like the atkManyToOneRelation, will use this flag to determine whether filters on related nodes should be executed.
AF_PARENT
When using an atkTreeNode instead of atkNode, this flag tells the node that the attribute is the foreign key in the parent/child relation. (Note: the atkTreeNode is not available in the ATK-light version that ships with Achievo.)
AF_NO_QUOTES
Atk puts quotes around field values when storing them in the database. Use this flag to indicate that it shouldn't use quotes. This is useful when the value should be treated as a SQL expression instead of a value.
AF_MULTILANGUAGE (alias for AF_ML)
Indicates which attribute is used to store the languagecode. Used in combination with NF_MULTILANGUAGE. Howto: Multilanguage_node (Note: this functionality is not available in the ATK-light version that ships with Achievo.).

Attribute specific flags

AF_BOOL_OBLIGATORY
Normally a atkBoolAttribute is not flagged obligatory, and if the standard AF_OBLIGATORY flag is set it is automatically removed when the attribute is constructed. If you really really really wants to show this attribute as obligatory, use this flag.
AF_BOOL_INLINE_LABEL
Show an extra label right next to the checkbox. ATK searches the language file for the following variants <attribute>_label, <attribute> (next to the module/node prefixes). Don't forget to add the AF_BLANK_LABEL flag if you don't want to show the normal label.
AF_BOOL_DISPLAY_CHECKBOX
Display checkbox in view / list mode instead of "yes" or "no".
AF_DATE_STRING
Date must be entered as a string, instead of using the date-selection dropdowns. Any string accepted by the php function strtotime is valid input when this flag is set.
AF_DATE_EMPTYFIELD
With this flag set, it is possible for the user to select a null-date.
AF_DUMMY_SHOW_LABEL
This flag makes the dummy have a label, just like other attributes.
AF_FILE_NO_UPLOAD
Remove the ability to upload new files.
AF_FILE_NO_SELECT
Disable the dropdown to select existing files. If this flag is set, the user can only upload a new file or keep the existing one.
AF_FILE_NO_DELETE
Remove the ability to delete the files (from the database. The physical file is never removed, unless the AF_FILE_PHYSICAL_DELETE flag is set).
AF_FILE_PHYSICAL_DELETE
If the file is removed from the database, the physical file is also removed from the server.
AF_FILE_NO_AUTOPREVIEW
By default, the atkFileAttribute tries to determine the filetype of the uploaded file, and if it's an image, display the image. If this flag is set, the detection is turned off and images are not displayed.
AF_FILE_POPUP
Instead of directly displaying the image, the attribute will display a link to a popup, if this flag is set.
AF_PASSWORD_NO_VALIDATE
By default, to change a password, the user must also enter the current password. If this flag is set, entering the current password is not necessary (useful for edit-screens where administrators must manage useraccounts and need to change users' passwords).
AF_PASSWORD_NOVALIDATE
This flag is an alias to AF_PASSWORD_NO_VALIDATE and is identical in every way.
AF_NO_TRANSLATION
Do not translate the options
AF_LIST_NO_OBLIGATORY_NULL_ITEM
Do not add a default null option.
AF_LIST_NO_NULL_ITEM
Do not add null option ever
AF_LIST_OBLIGATORY_NULL_ITEM
Add a default null option to obligatory items
AF_DISPLAY_VERT
Align the options vertically instead of horizontally.
AF_RELATION_AUTOLINK
If this flag is set, the edit-dropdown will have 2 additional links; one to edit the currently selected record, and one to add a new record to the dropdown. When displaying the attribute, for example in recordlists, the displayed value is automatically displayed as a link to the view-page of the seleted record.
AF_RELATION_NO_NULL_ITEM
If this flag is set, and $config_list_obligatory_null_item is set to true, to prevent relations from selecting a default record, then this will remove that null item for the relation that has this flag.
AF_MANYTOONE_OBLIGATORY_NULL_ITEM
When AF_OBLIGATORY is used, this makes sure that the first option of the drop down list is set to "none". May be handy if onChange event is set on relation.


AF_RELATION_AUTOCOMPLETE
Instead of a dropdown, the user is presented with a text box that features autocompletion when typing.
AF_MANYTOONE_LAZY
By default, when loading records in a node, the destination record of manytoonerelations is loaded directly with the main query. When this flag is set, it is only loaded when it is needed in an edit screen.
AF_ONETOONE_INTEGRATE
If a node has a onetoone relationship with another node, the edit fields of the other node are indented slightly to indicate that they belong to the other node. If the AF_ONETOONE_INTEGRATE flag is set, the other nodes' edit fields are displayed in such a manner that it is invisible to the user that they are part of another node. The user sees the entire edit-page as if all fields belonged to the same node.
AF_ONETOONE_ERROR
For backwardscompatibility reasons, the atkOneToOneRelation does not validate input of the destination node. If this flag is set, validation is done.
AF_ONETOONE_ADD
Override the default no add flag.
AF_ONETOONE_LAZY
Use lazy loading instead of query addition.
AF_ONETOONE_RESPECT_TABS
Respects tab/sections that have been assigned to this attribute instead of using the tabs assigned for the attributes in the destination node. This flag is only useful in integration mode.
AF_RESTRICTED_DELETE
Only allow deletion of master item when there are no child records.
AF_ONETOMANY_ADD_DIALOG
Use pop-up dialog for adding records instead of a new page.
AF_ONETOMANY_EMBED
If this flag is set, the 'add' form for new child records is loaded inline, rather than in a new page.

Deprecated: Replaced by AF_ONETOMANY_ADD_DIALOG.

AF_ONETOMANY_ADDORCOPY_DIALOG
Use pop-up dialog for whatever a new record must be copied or must be added.
AF_ONETOMANY_SHOW_ADD
Using this flag it's possible to use the atkOneToManyRelation when you still need to add the master record. The detail records will be temporarily stored in the session until the master record is added.

WARNING: Not on by default because this only works in simple cases, not having an id will lead to strange results for:

  • Nodes that use the foreign key in their descriptor
  • Nodes with unique records (AF_UNIQUE always just checks the database)
  • Combined primary keys
AF_MANYBOOL_NO_TOOLBAR
Hides the 'Select All/Select None/Invert Selection' toolbar.