Title: Data Export &#8211; hyperlinks
Last modified: August 11, 2021

---

# Data Export – hyperlinks

 *  Resolved [michael3740](https://wordpress.org/support/users/michael3740/)
 * (@michael3740)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/data-export-hyperlinks/)
 * Hi Peter, Question 2
    I have 3 fields in my table with hyperlinks.
    - **Screenshot of Response** is a Dynamic Hyperlink pointing to an image file
      on my site.
    - **Zipfile **is set as a hyperlink in Data Explorer and has the format
       `{"
      label":" Download: foi-202100216108.zip", "url":"https://thetrue.scot/wp-content/
      include-me/foi/zip/foi-202100216108.zip","target":"_blank"}`
    - **docLinks **
 * All three work fine when viewed on the screen but in exports all I get is the
   link text, e’g’ **Download: foi-202100216108.zip** rather than the actual URL.
 * The third question is kind of related to the above in that I’m wondering if it
   is possible to export different fields than are displayed? If it was then I’m
   guessing that a field that is set to text but contains a valid URL would export
   the URL intact?
 * Thanks again
 * Michael

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

 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/data-export-hyperlinks/#post-14761910)
 * Hi Michael,
 * Your hyperlink question is a tough one! The standard export buttons just export
   the content. What do you want to be exported?
 * You can add your own custom buttons and add your own logic. This is documented
   here:
    [https://wpdataaccess.com/docs/documentation/data-publisher/custom-buttons/](https://wpdataaccess.com/docs/documentation/data-publisher/custom-buttons/)
 * Below is the code for the SQL button (part of the premium version). You could
   write something similar that fits your needs.
 *     ```
       function export_publication_selection_to_sql(table_name, pub_id, wp_nonce, primary_key) {
       	// Get table data
       	table = jQuery('#' + table_name + pub_id ).DataTable();
       	rows = table.rows({selected:true});
       	if (table.rows({selected:true}).count()===0) {
       		rows = table.rows();
       	}
       	data = rows.data();
   
       	// Add key values to array
       	ids = [];
       	rows.every(function ( rowIdx, tableLoop, rowLoop ) {
       		ids.push(jQuery(this.node()).find('td').eq(jQuery(this.node()).find("td." + primary_key).prop("cellIndex")).text());
       	});
   
       	// Define target url and add arguments
       	url =
       		wpda_pluginvars.wpda_ajaxurl +
       		"?action=wpda_export&type=row&mysql_set=off&show_create=off&show_comments=off&format_type=sql" +
       		"&pub_id=" + pub_id +
       		"&table_names=" + table_name +
       		"&_wpnonce=" + wp_nonce;
   
       	// Add keys to url
       	for (i=0; i<ids.length; i++) {
       		for (var pk in primary_key) {
       			url += '&' + primary_key[pk] + '[' + i + ']=' + encodeURIComponent(ids[i]);
       		}
       	}
   
       	window.location.href = url;
       }
       ```
   
 * Thanks,
    Peter
 *  Thread Starter [michael3740](https://wordpress.org/support/users/michael3740/)
 * (@michael3740)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/data-export-hyperlinks/#post-14770115)
 * Thanks Peter
 * I don’t know enough to code that but I’ll see what I can learn.
 * For the links, a standard link is
    `<a href="http://www.example.com">Link Text
   </a>` The export functions will output `Link Text` but I want to be able to output`
   http://www.example.com`
 * I’m thinking of a few workarounds and will update this thread for others to maybe
   benefit from in the future.
 * Michael
    -  This reply was modified 4 years, 9 months ago by [michael3740](https://wordpress.org/support/users/michael3740/).
    -  This reply was modified 4 years, 9 months ago by [michael3740](https://wordpress.org/support/users/michael3740/).
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/data-export-hyperlinks/#post-14772914)
 * Hi Michael,
 * Is it be an option to show the link + the full URL? The user can still click 
   on the link in the browser but the full link will be printed as well. You could
   use a dyanmic hyperlink to achieve that result (need to change the format of 
   the column as well). See:
    [https://wpdataaccess.com/docs/documentation/data-explorer/dynamic-hyperlinks/](https://wpdataaccess.com/docs/documentation/data-explorer/dynamic-hyperlinks/)
 * Best regards,
    Peter

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

The topic ‘Data Export – hyperlinks’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/data-export-hyperlinks/#post-14772914)
 * Status: resolved