Title: Customize draft link
Last modified: July 25, 2022

---

# Customize draft link

 *  Resolved [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/)
 * Hi There,
    Is there a way to customize the draft link? I need to add extra parameter
   to the url, so currently the URL is like this `http://website.com/form/?draft
   =4nb6dfd29e27`, I’d like to change it to `http://website.com/form/?draft=4nb6dfd29e27&
   car_id=12345`.
 * Thanks!

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

 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15855695)
 * Hi [@satrya](https://wordpress.org/support/users/satrya/)
 * I hope you’re well today!
 * The “draft link” that you shared seems to be a post/page draft so I’m assuming
   it’s a draft post with a form on it but the form itself is published, right?
 * With a &car_id=12345 parameter added, it seems like you are trying to “pre-fill”
   some form field, is that correct?
 * If yes, then it should work out of the box anyway. If you already have “pre-populate”
   option enabled for a form field and its “Query parameter (optional)” option is
   set to “car_id” then if you access such link, the form would pick it up.
 * But I’m not quite sure if I correctly understood your request. If not, please
   elaborate (example use scenario could help).
 * Kind regards,
    Adam
 *  Thread Starter [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15858545)
 * > With a &car_id=12345 parameter added, it seems like you are trying to “pre-
   > fill” some form field, is that correct?
 * Yes and also no.
 * I mean, yes I need the pre-fill but also I need the `car_id` because there are
   some custom data that needs this `car_id`. I was trying to find any hook or filter,
   but I can’t find anything.
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15864756)
 * Hi [@satrya](https://wordpress.org/support/users/satrya/)
 * I hope you are doing well.
 * I am afraid we don’t have a filter for that as far as I can see but we may need
   a different approach here.
 * I escalated this case to our developers so we can verify what would be the best
   way for you.
 * We will keep you posted.
    Best Regards Patrick Freitas
 *  Thread Starter [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15865739)
 * Thanks!
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15867020)
 * Hi [@satrya](https://wordpress.org/support/users/satrya/)
 * I hope you are doing well.
 * Can you test this code?
 *     ```
       <?php 
   
       add_filter( 'forminator_form_save_draft_response', 'wpmudev_get_params_draft_link', 10, 2 );
       function wpmudev_get_params_draft_link( $response, $form_id ) {
       	if( $form_id != 361 ) { //Please change the form ID here
       		return $response;
       	}
   
       	$car_id = '';
       	$request_url = parse_url( wp_get_referer() );
       	parse_str( $request_url[ 'query' ], $path );
       	if( $path[ 'car_id' ] ) {
       		$car_id = $path[ 'car_id' ];
       	}
   
       	$draft_id = isset( $response['draft_id'] ) ? $response['draft_id'] : '';
       	if( $draft_id && $car_id ) {
       		$replace_text = $response['draft_id'].'&car_id='.$car_id;
       		$response['message'] = str_replace( $response['draft_id'], $replace_text, $response['message'] ); 
       	}
   
       	return $response;
       }
       ```
   
 * Best Regards
    Patrick Freitas
 *  Thread Starter [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15867042)
 * It works perfectly, Patrick, thank you so much! And now I can add as many custom
   data based on this `car_id`. Thank you once again.
 *  Plugin Support [Jair – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport15/)
 * (@wpmudevsupport15)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15868662)
 * Hi [@satrya](https://wordpress.org/support/users/satrya/),
 * We are happy to hear that the issue has been resolved.
    Please let us know if
   you need further help.
 * Kind regards,
    Zafer

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

The topic ‘Customize 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/)

 * 7 replies
 * 4 participants
 * Last reply from: [Jair – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport15/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/customize-draft-link/#post-15868662)
 * Status: resolved