/**
  * Display the Update/Cancel/Delete buttons for the Edit Entry form
  * @since 1.8
  * @return string
  */
 public function render_form_buttons()
 {
     return gravityview_ob_include(GravityView_Edit_Entry::$file . '/partials/form-buttons.php', $this);
 }
    /**
     * Display the Edit Entry form
     *
     * @return [type] [description]
     */
    public function edit_entry_form()
    {
        $back_link = esc_url(remove_query_arg(array('page', 'view', 'edit')));
        ?>

        <div class="gv-edit-entry-wrapper"><?php 
        /**
         * Fixes weird wpautop() issue
         * @see https://github.com/katzwebservices/GravityView/issues/451
         */
        $javascript = gravityview_ob_include(GravityView_Edit_Entry::$file . '/partials/inline-javascript.php');
        echo gravityview_strip_whitespace($javascript);
        ?>
<h2 class="gv-edit-entry-title">
                <span><?php 
        /**
         * @filter `gravityview_edit_entry_title` Modify the edit entry title
         * @param string $edit_entry_title Modify the "Edit Entry" title
         * @param GravityView_Edit_Entry_Render $this This object
         */
        echo esc_attr(apply_filters('gravityview_edit_entry_title', __('Edit Entry', 'gravityview'), $this));
        ?>
</span>
            </h2>

            <?php 
        // Display the success message
        if (rgpost('action') === 'update') {
            if (!$this->is_valid) {
                // Keeping this compatible with Gravity Forms.
                $validation_message = "<div class='validation_error'>" . __('There was a problem with your submission.', 'gravityview') . " " . __('Errors have been highlighted below.', 'gravityview') . "</div>";
                $message = apply_filters("gform_validation_message_{$this->form['id']}", apply_filters("gform_validation_message", $validation_message, $this->form), $this->form);
                echo GVCommon::generate_notice($message, 'gv-error');
            } else {
                $entry_updated_message = sprintf(esc_attr__('Entry Updated. %sReturn to Entry%s', 'gravityview'), '<a href="' . $back_link . '">', '</a>');
                /**
                 * @filter `gravityview/edit_entry/success` Modify the edit entry success message (including the anchor link)
                 * @since 1.5.4
                 * @param string $entry_updated_message Existing message
                 * @param int $view_id View ID
                 * @param array $entry Gravity Forms entry array
                 * @param string $back_link URL to return to the original entry. @since 1.6
                 */
                $message = apply_filters('gravityview/edit_entry/success', $entry_updated_message, $this->view_id, $this->entry, $back_link);
                echo GVCommon::generate_notice($message);
            }
        }
        ?>

            <?php 
        // The ID of the form needs to be `gform_{form_id}` for the pluploader
        ?>

            <form method="post" id="gform_<?php 
        echo $this->form_id;
        ?>
" enctype="multipart/form-data">

                <?php 
        wp_nonce_field(self::$nonce_key, self::$nonce_key);
        wp_nonce_field(self::$nonce_field, self::$nonce_field, false);
        // Most of this is needed for GFFormDisplay::validate(), but `gform_unique_id` is needed for file cleanup.
        ?>


                <?php 
        /**
         * By default, the lead_detail_edit method uses the `RGFormsModel::get_lead_field_value()` method, which doesn't fill in $_POST values when there is a validation error, because it was designed to work in the admin. We want to use the `RGFormsModel::get_field_value()` If the form has been submitted, use the values for the fields.
         */
        //add_filter( 'gform_get_field_value', array( $this, 'get_field_value' ), 10, 3 );
        // Print the actual form HTML
        $this->render_edit_form();
        //echo $this->render_form_buttons();
        ?>
            </form>

        </div>

    <?php 
    }