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 10 years, 2 months ago by Tralisk. Reason: adding method
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Privacy & Cookies Policy
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.