Title: Edit drafts from admin panel, copy draft link
Last modified: August 24, 2022

---

# Edit drafts from admin panel, copy draft link

 *  Resolved [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/)
 * Hi,
    I’m playing around with the save as draft option and I’m missing one thing:
   the ability to edit the drafts from the control panel, or to recover the link
   somehow. It seems that there’s no way to recover the “continue” link if you skip
   the “copy this link or put in your email” step, even as the same user that was
   filling in the form.
 * We want to use the form as a sort of checklist and then come back to it after
   100+ days as a sort of “unchecklist”. The way it works right now is a bit cumbersome.
 * Possible workaround: ability to copy the draft link to a hidden field, maybe?
   Would that be possible?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15946212)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/)
 * I hope you’re well today!
 * You are right – currently there’s no “edit” option for editing submissions (neither“
   drafts” nor complete submissions). This is something that’s already on a list
   of features planned for future but at the moment it’s not yet possible and I 
   don’t have an ETA, I’m afraid.
 * As for recovering draft link – it’s not “a click away” but it is actually possible
   because a “draft ID” is saved with each draft.
 * So let’s say that your form is on page
 * [https://domain.com/form-page/](https://domain.com/form-page/)
 * Once the draft is saved you can check draft ID by viewing this draft submission
   on “Forminator -> Submissions” page.
 * Then you just need to enter URL like this
 * [https://domain.com/form-page/?draft=XXX](https://domain.com/form-page/?draft=XXX)
 * where XXX would be replaced with that draft ID taken from saved submission.
 * So while as of now there’s no a “click solution” you can still create such draft
   link manually to share it with user.
 * Best regards,
    Adam
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15948109)
 * I see, thanks. I guess that’ll have to do for now.
    I don’t suppose there’s a
   variable that can be used for a hidden field? Similar to “Submission ID” from
   the preset, but “Draft ID”? That would make it a bit more convenient and open
   up some possibilities.
 *  Plugin Support [Nebu John – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport14/)
 * (@wpmudevsupport14)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15955462)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/),
 * I am afraid draft ID is unavailable as a default variable in the Hidden field.
   I have brought this to the notice of our developers to check if we can provide
   a quick workaround for this.
 * Kind Regards,
    Nebu John
 *  Plugin Support [Nebu John – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport14/)
 * (@wpmudevsupport14)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15956599)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/),
 * Please try the following workaround on your staging/test website, it should help.
 *     ```
       add_filter( 'forminator_form_save_draft_response', 'wpmudev_update_draft_id_hidden', 10, 2 );
       function wpmudev_update_draft_id_hidden( $response, $form_id ) {
       	if( $form_id != 361 ) { //Please change the form ID here
       		return $response;
       	}
   
       	$draft_id = isset( $response['draft_id'] ) ? $response['draft_id'] : '';
       	if ( $draft_id ) {
       		global $wpdb;
       		$entry_table_name = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY );
           	$sql              = "SELECT <code>entry_id</code> FROM {$entry_table_name} WHERE <code>form_id</code> = %d AND <code>draft_id</code> = %s";
           	$entry_id         = $wpdb->get_var( $wpdb->prepare( $sql, $form_id, $draft_id ) );
       		if ( $entry_id ) {
       			$entry_meta = array(
       				array(
       					'name' => 'hidden-1',
       					'value' => $draft_id
       				)
       			);
       			Forminator_API::update_form_entry( $form_id, $entry_id, $entry_meta );
       		}
       	}
   
       	return $response;
       }
       ```
   
 * Please note, you need to change the form ID here _if( $form\_id != 361 ) {_ and
   the field ID hidden-1 it it is different. You can add the code using a mu-plugin.
   Please find more details here: [https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins](https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins)
 * Kind Regards,
    Nebu John
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15957588)
 * Thanks.
    I checked it out and it doesn’t seem to do anything. I added the “<?
   php” opening tag, put the file in mu-plugins – as is tradition – and edited $
   form_id and hidden-1 as appropriate. The hidden field behaves as it always does.
 * I double-checked the form id, and folder permissions are ok as well.
 * Am I missing something? Should the hidden field be the “Query Parameter” or “
   Custom value” type? What should I enter there, if so?
 *  Plugin Support [Nebu John – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport14/)
 * (@wpmudevsupport14)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15960214)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/),
 * Sorry, while sharing the snippet, this symbol(`) changed to <code>, that’s why
   it’s not working.
 * Can you please check if the following code works? I checked this on a test website
   and ensured it worked as expected.
 *     ```
       add_filter( 'forminator_form_save_draft_response', 'wpmudev_update_draft_id_hidden', 10, 2 );
       function wpmudev_update_draft_id_hidden( $response, $form_id ) {
       	if( $form_id != 361 ) { //Please change the form ID here
       		return $response;
       	}
   
       	$draft_id = isset( $response['draft_id'] ) ? $response['draft_id'] : '';
       	if ( $draft_id ) {
       		global $wpdb;
       		$entry_table_name = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY );
           	$sql              = "SELECT entry_id FROM {$entry_table_name} WHERE form_id = %d AND draft_id = %s";
           	$entry_id         = $wpdb->get_var( $wpdb->prepare( $sql, $form_id, $draft_id ) );
       		if ( $entry_id ) {
       			$entry_meta = array(
       				array(
       					'name' => 'hidden-1',
       					'value' => $draft_id
       				)
       			);
       			Forminator_API::update_form_entry( $form_id, $entry_id, $entry_meta );
       		}
       	}
   
       	return $response;
       }
       ```
   
 * The hidden field should be set to custom value. Please let us know how that goes.
 * Kind Regards,
    Nebu John
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15960285)
 * Great, it works now.
    Now I can just edit the ‘value’ in the script to put together
   a draft link – this will make things a bit more convenient. Thanks for going 
   the extra mile.
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15960302)
 * Hi [@pemptus](https://wordpress.org/support/users/pemptus/)
 * I’m happy to hear it works for you now!
 * I suppose we can mark this ticket as resolved then, right?
 * Best regards,
    Adam
 *  Thread Starter [Pemptus](https://wordpress.org/support/users/pemptus/)
 * (@pemptus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15960417)
 * By all means, mark away.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Edit drafts from admin panel, copy draft link’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Pemptus](https://wordpress.org/support/users/pemptus/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/edit-drafts-from-admin-panel-copy-draft-link/#post-15960417)
 * Status: resolved