kirki icon indicating copy to clipboard operation
kirki copied to clipboard

Placeholder for text input & textarea controls

Open DevelopOnline opened this issue 11 years ago • 2 comments

Hi there

in version 0.6.2, I had added placeholder to text input controls by adding below lines of code to includes\controls\class-kirki-customize-text-control.php :

Line 5: public $placeholder = 'Write something here'; Line 9: if (array_key_exists('placeholder', $args)) { $placeholder = $args['placeholder']; } Line 24: <input type="text" placeholder="placeholder ); ?>" value="value() ); ?>" link(); ?> />

how can I add placeholder to kirki 0.7.1 (current version) text & textarea controls?! would you please add this feature to kirki master branch?! Or at least please guide me that I do it myself.

Thanks in advance

DevelopOnline avatar Mar 24 '15 15:03 DevelopOnline

Hey there!

We now use the WordPress core controls for these. You can add your own placefolders using jQuery: http://stackoverflow.com/a/13152544

aristath avatar Mar 26 '15 20:03 aristath

This is way old, but I found it via a google search. Just wanted to post for anyone that needs this... since Kirki uses native controls for text field you can use input_attrs param for this and it works great, no need for jQuery. https://wordpress.stackexchange.com/questions/276326/is-there-any-way-to-add-placeholder-for-wordpress-customizer-text-input-fields

JiveDig avatar Mar 04 '20 15:03 JiveDig