Title: Adding custom attribute to input field
Last modified: August 21, 2016

---

# Adding custom attribute to input field

 *  Resolved [Chintaru](https://wordpress.org/support/users/chanty87/)
 * (@chanty87)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-custom-attribute-to-input-field/)
 * Hi,
 * I’d like to add a placeholder attribute to certain input fields, and since the
   form fields are generated through php (why is this?) I can’t simply override 
   the form with a template in my theme folder. So I resorted to trying to hack 
   it into the core file frontend-uploader.php (yeah yeah I know, bad practice but
   it won’t be updated anyway since it’s for a short-term project) and added it 
   to `$atts` and included it in the shortcode. It’s in the `$atts` array, has a
   value, but it just won’t show up in the output, unlike the class and id in the
   same array. Is there any other way (a hook for functions.php perhaps?) to solve
   this?
 * [http://wordpress.org/plugins/frontend-uploader/](http://wordpress.org/plugins/frontend-uploader/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Chintaru](https://wordpress.org/support/users/chanty87/)
 * (@chanty87)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-custom-attribute-to-input-field/#post-4502373)
 * Aaaand just as I posted it I found the solution at the bottom of /lib/php/class-
   html-helper.php
 * If I may make a suggestion for the next update: please add some templating functionality
   in the next version… So core files don’t have to be hacked into for such a simple
   addition.

Viewing 1 replies (of 1 total)

The topic ‘Adding custom attribute to input field’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/frontend-uploader_81a69d.svg)
 * [Frontend Uploader](https://wordpress.org/plugins/frontend-uploader/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/frontend-uploader/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/frontend-uploader/)
 * [Active Topics](https://wordpress.org/support/plugin/frontend-uploader/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/frontend-uploader/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/frontend-uploader/reviews/)

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [input](https://wordpress.org/support/topic-tag/input/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 1 participant
 * Last reply from: [Chintaru](https://wordpress.org/support/users/chanty87/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/adding-custom-attribute-to-input-field/#post-4502373)
 * Status: resolved