Title: Number as header value throws replace error
Last modified: August 31, 2016

---

# Number as header value throws replace error

 *  Resolved [acodesmith](https://wordpress.org/support/users/acodesmith/)
 * (@acodesmith)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/)
 * If the header values are numbers the admin throws a error when trying to display
   the data.
 * input-v5.js?ver=1.0.5:327 Uncaught TypeError: p.data.h[i].c.replace is not a 
   function
 * Not a good solution but I fixed it by forcing the value to be a string
    `String(
   p.data.h[ i ].c).replace`
 * [https://wordpress.org/plugins/advanced-custom-fields-table-field/](https://wordpress.org/plugins/advanced-custom-fields-table-field/)

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

 *  Plugin Author [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * (@jonua)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/#post-7305578)
 * Hello acodesmith,
 * thanks for reporting me this issue. Can you please tell me the browser and version?
 * Thanks much,
    Johann
 *  Thread Starter [acodesmith](https://wordpress.org/support/users/acodesmith/)
 * (@acodesmith)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/#post-7305600)
 * Johann,
    I need to clarify! I wrote a plugin for importing CSVs into your Table
   Layout. During the import process, PHP must be inserting the record into the 
   DB as a number. It only happens with a direct DB import, not the GUI.
 * Most current version of Chrome on Mac.
 *  Plugin Author [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * (@jonua)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/#post-7305619)
 * OK, I understand. Why PHP must be inserting the record into the DB as a number?
   Do you mean the database field type or a value in the JSON string?
 *  Thread Starter [acodesmith](https://wordpress.org/support/users/acodesmith/)
 * (@acodesmith)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/#post-8923474)
 * Sorry for never getting back to you. I resolved this issue in the code.
 * Here is the github repo for the table importer using your plugin:
    [https://github.com/acodesmith/advanced-custom-fields-table-importer](https://github.com/acodesmith/advanced-custom-fields-table-importer)
 * Thanks for the plugin, great work!

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

The topic ‘Number as header value throws replace error’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields-table-field/assets/icon-256x256.png?
   rev=1962986)
 * [Table Field Add-on for ACF and SCF](https://wordpress.org/plugins/advanced-custom-fields-table-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields-table-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 4 replies
 * 2 participants
 * Last reply from: [acodesmith](https://wordpress.org/support/users/acodesmith/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/number-as-header-value-throws-replace-error/#post-8923474)
 * Status: resolved