diff --git a/includes/extensions/edit-entry/class-edit-entry-render.php b/includes/extensions/edit-entry/class-edit-entry-render.php index 0039f5f04e..6906b3c07e 100644 --- a/includes/extensions/edit-entry/class-edit-entry-render.php +++ b/includes/extensions/edit-entry/class-edit-entry-render.php @@ -610,7 +610,7 @@ private function process_save_process_files( $form_id ) { */ public function save_field_value( $value = '', $entry = array(), $field = null, $form = array(), $input_id = '' ) { - if ( ! $field || 'fileupload' != $field->type ) { + if ( ! $field || $field->get_input_type() !== 'fileupload' ) { return $value; } @@ -915,13 +915,17 @@ private function maybe_update_post_fields( $form ) { case 'post_category': break; case 'post_custom_field': - if ( is_array( $value ) && ( floatval( $field_id ) !== floatval( $field->id ) ) ) { + if ( $field->get_input_type() === 'fileupload' ) { + break; + } + + if ( is_array( $value ) && ( (float) $field_id !== (float) $field->id ) ) { $value = $value[ $field_id ]; } - if ( ! empty( $field->customFieldTemplateEnabled ) ) { - $value = $this->fill_post_template( $field->customFieldTemplate, $form, $entry_tmp, true ); - } + if( ! empty( $field->customFieldTemplateEnabled ) ) { + $value = $this->fill_post_template( $field->customFieldTemplate, $form, $entry_tmp, true ); + } $value = $field->get_value_save_entry( $value, $form, '', $this->entry['id'], $this->entry ); @@ -1509,8 +1513,9 @@ public function modify_edit_field_input( $field_content = '', $field = null, $va // If the form has been submitted, then we don't need to pre-fill the values, // Except for fileupload type and when a field input is overridden- run always!! - if ( - ( $this->is_edit_entry_submission() && ! in_array( $field->type, array( 'fileupload', 'post_image' ) ) ) + + if( + ( $this->is_edit_entry_submission() && !in_array( $field->get_input_type(), array( 'fileupload', 'post_image' ) ) ) && false === ( $gv_field && is_callable( array( $gv_field, 'get_field_input' ) ) ) && ! GFCommon::is_product_field( $field->type ) || ! empty( $field_content ) diff --git a/readme.txt b/readme.txt index f3e5bd68c1..26ae2b8e7a 100644 --- a/readme.txt +++ b/readme.txt @@ -28,6 +28,7 @@ This release makes it easier to customize search results per-View instead of glo * Added: Ability to send notifications using Gravity Forms when an entry is deleted by selecting the "GravityView - Entry is deleted" event from the event dropdown in Gravity Forms notifications settings * Fixed: Sorting the View by entry ID in ascending and descending order would yield the same result * Fixed: Survey fields without a rating would show a 1-star rating +* Fixed: Custom Post Field acting as File Uploads can now be edited on the Edit Entry page __Developer Updates:__