addElement('hidden', 'oplock_ts', $timestamps['modified_date'], array('id' => 'oplock_ts')); $form->addFormRule(array('CRM_Contact_Form_Inline_Lock', 'formRule'), $contactID); } /** * Ensure that oplock_ts hasn't changed in the underlying DB * * @param array $fields the input form values * @param array $files the uploaded files if any * @param null $contactID * * @return true if no errors, else array of errors * @access public * @static */ static function formRule($fields, $files, $contactID = NULL) { $errors = array(); $timestamps = CRM_Contact_BAO_Contact::getTimestamps($contactID); if ($fields['oplock_ts'] != $timestamps['modified_date']) { // Inline buttons generated via JS $open = sprintf("