Pixel & Tonic

FieldFrame

version works on rated
1.4 EE1
Download Get Help

Postponed Saving

FieldFrame 1.0.5 added support for “postponed saving” — where a fieldtype’s save_field() function does not get called until a point at which the entry’s ID is known.

You can enable postponed saving with the postpone_saves class variable:

class Playa extends Fieldframe_Fieldtype {

    // ...

    var $postpone_saves = TRUE;

    // ...

}

The entry’s ID will then be sent to the fieldtype’s save_field() function as a third parameter:

class Playa extends Fieldframe_Fieldtype {

    // ...

    function save_field($field_data, $field_settings, $entry_id)
    {
        // ...
    }

    // ...

}

Additionally, postponed saving has been enabled on FF Matrix, so all celltypes will also receive the $entry_id parameter in their save_cell() functions.