Looking to put placeholder text in your inputs? ….
So, i’m no technical genius so i don’t have a solution that adds a nice new “placeholder” text entry field in the field manager, but below is what i did to get it working on fields using the title attribute as the placeholder text, which is what i wanted.
As usual, this is probably an update to the core which will be overwritten on updates so be careful . . .
In plugins/user-meta/views/generateField.php around line 343 you have the start of the field value builder:
Above i have added “placeholder” => $fieldTitle, where i stole the $fieldtitle from the “label” in the first instance.
So thats how to do it, just took a while to find that this is where the attributes were being built, and i should have paid attention to Dreamweaver not allowing me to modify the plugin files while i was testing . . . make the change using WP editor if possible.
I could probably develop an entry box into the admin, but i can’t be bothered and it is an update to a core file, so will leave it for the feature requests, but this will work for me atleast for now.
This topic was modified 11 years, 5 months ago by Tralisk. Reason: adding method
Author
Posts
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.