Skip to content

Instantly share code, notes, and snippets.

@jaspertandy
Created September 13, 2013 16:50
Show Gist options
  • Save jaspertandy/6553181 to your computer and use it in GitHub Desktop.
Save jaspertandy/6553181 to your computer and use it in GitHub Desktop.
in method edit_entry()
if ($form_data['field_order'] !== '')
{
$order_ids = $this->actions()->pipe_split($form_data['field_order']);
if ( ! empty($order_ids))
{
//this makes sure that any fields in 'fields' are in the
//order set as well. Will add missing at the end like this
$field_loop_ids = array_merge(
$order_ids,
array_diff($field_loop_ids, $order_ids)
);
}
}
$layout = $this->composer_field_order( ee()->input->get('form_id') );
if ( $layout && empty($order_ids) ) {
$field_loop_ids = array_merge( $layout , array_diff( $field_loop_ids , $layout ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment