*/
public function updateEntry($id, $idField = 'id', $store = true, $fieldPrefix = '')
{
+ $this->selectGroupFields();
// Store any input field prefix
$this->fieldPrefix = $fieldPrefix;
}
+ $this->restoreFields();
return $r;
}
public function selectGroupFields()
{
if ( $this->groupSelect && is_array( $this->groupSelect ) && !empty( $this->groupSelect ) ) {
+ // Clean the array of fields
$this->saveFields = $this->fields;
$this->fields = false;
foreach ( $this->groupSelect as $groupSelected ) {
// Find the group
if ( isset( $this->groups[$groupSelected] ) && $this->groups[$groupSelected] ) {
- trigger_error( print_r( $this->groups[$groupSelected], true ), E_USER_NOTICE );
+ // trigger_error( print_r( $this->groups[$groupSelected], true ), E_USER_NOTICE );
if ( isset( $this->groups[$groupSelected]['fields'] ) && is_array( $this->groups[$groupSelected]['fields'] ) ) {
foreach ( $this->groups[$groupSelected]['fields'] as $fieldKey => $field ) {
- trigger_error( print_r( $field, true ), E_USER_NOTICE );
+ // trigger_error( print_r( $field, true ), E_USER_NOTICE );
$this->fields[] = $this->saveFields[$field['name']];
}
}
public function restoreFields()
{
$this->fields = $this->saveFields;
- $this->saveFields = false;
+ // $this->saveFields = false;
}
}