field__pullValue delegate class method[Permalink]
The field__pullValue() delegate class method can be used to transform database from the database for use in an edit/new record form. Sometimes it is the case that we want users to be able to work with data differently than it is stored in the database. This method should always be accompanied by a corresponding field__pushValue method which performs the inverse operation and is used to transform the value in an edit form into a format that can be stored in the database. ExampleGiven a field start_ip that stores an IP address in the database as an unsigned INT, we want to be able to work with the data on the edit form in a friendlier format - the standard IP address dot notation, so we define pullValue and pushValue methods for the field in the table's delegate class.
References
|