Created
September 13, 2013 16:50
-
-
Save jaspertandy/6553181 to your computer and use it in GitHub Desktop.
in method edit_entry()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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