Title: &quot;Edit Link&quot; resets data
Last modified: August 22, 2016

---

# "Edit Link" resets data

 *  [roydigerhund](https://wordpress.org/support/users/roydigerhund/)
 * (@roydigerhund)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edit-link-resets-data/)
 * Hello,
 * when I press the “Edit Link” button the shown popup doesn’t load the existing
   data and resets all fields.
 * Any ideas how to solve this problem?
 * Matze
 * [https://wordpress.org/plugins/advanced-custom-fields-link-picker-field/](https://wordpress.org/plugins/advanced-custom-fields-link-picker-field/)

Viewing 1 replies (of 1 total)

 *  [thesarahkemp](https://wordpress.org/support/users/thesarahkemp/)
 * (@thesarahkemp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/edit-link-resets-data/#post-5438888)
 * For what it’s worth, you can edit the JS for this field, changing:
 *     ```
       jQuery('body').on('click', '.link-btn', function(event)
               {
                   var thisID = jQuery(this).attr("id");
                   doingLink = thisID;
   
                   wpActiveEditor = true; // we need to override this var as the link dialogue is expecting an actual wp_editor instance
                   //console.log(wpLink);
                   wpLink.open(); // open the link popup
                   return false;
               });
       ```
   
 * To:
 *     ```
       jQuery('body').on('click', '.link-btn', function (event)
               {
                   var thisID = jQuery(this).attr("id");
                   doingLink = thisID;
   
                   wpActiveEditor = true; // we need to override this var as the link dialogue is expecting an actual wp_editor instance
                   wpLink.setDefaultValues = function () {
                       $('#url-field').val($('#' + doingLink + '-url').val());
                       $('#link-title-field').val($('#' + doingLink + '-title').val());
                   };
                   wpLink.open(); // open the link popup
                   return false;
               });
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘"Edit Link" resets data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-custom-fields-link-picker-
   field.svg)
 * [Advanced Custom Fields: Link Picker Field](https://wordpress.org/plugins/advanced-custom-fields-link-picker-field/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields-link-picker-field/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields-link-picker-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields-link-picker-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields-link-picker-field/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [thesarahkemp](https://wordpress.org/support/users/thesarahkemp/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/edit-link-resets-data/#post-5438888)
 * Status: not resolved