When working with CCK, have you ever wished you could specify PHP code to perform processing on what a user has entered into a field before the field value is stored?
Have you ever wanted to use a Node Reference field, but have users specify the node(s) to reference in a completely different format than the node ID or node title? For example, to have users enter codes like the kind you would find under the cap of a soda bottle, while having the field convert the codes into node references under-the-hood?
If you've found yourself in any of these situations, then Covert Fields is for you!
This module defines a CCK widget and field formatter that can sit on top of a Text, Node Reference, or User Reference field. To the user, the widget looks like a normal text field, but it provides the administrator of the site with the ability to specify PHP code that gets invoked at the following stages of the CCK field lifecycle:
- During widget input validation (Code for Validation)
- After widget input validation, but before input is passed-on to the underlying CCK field type for validation & storage. (Code for Stored Value)
- After storage, but before display of the node to the user (if the display formatter is used). (Code for Displayed Value)
- After storage, but before the node edit form is presented to the user. (Code for Displayed Value)
Essentially, this module de-couples what the user enters and sees for a field value from how that value is stored in the underlying CCK field.
Features (for users with the ability to modify CCK field settings)
- Allows a user with the permission to enter PHP code to optionally provide code to control how a Covert Field validates a user's entry; converts a user's entry into the value needed for storage; and converts the stored value into the value needed for display.
- Allows a user who does not have the permission to enter PHP code to see what PHP code has been entered for the Covert Field but not modify it.
- Allows a user to override the validation error returned by the underlying CCK field with a more specific, more user-friendly, custom message. The custom message can include the original message or the value that the user entered.
- Maintenance status: Unknown
- Development status: Unknown
- Reported installs: 52 sites currently report using this module. View usage statistics.
- Downloads: 1,777
- Last modified: November 27, 2014