Support

Account

Home Forums Feature Requests Hover over fields to see key/name

Helping

Hover over fields to see key/name

  • Just wanted to share this as an idea and for others to use.

    I deal with a lot of field groups and wanted to quickly grab the key or field name to tie into my code.

    I built this using some CSS/JS and put it on codepen as an example: https://codepen.io/RadGH/pen/zYNjyxE

    Here’s how it works:

    Mouse hovering over fields to reveal the key and name of the field

    It would be ideal if you could toggle it off with screen options but my hacky version doesn’t do that.

    Leaving this here for the idea and if anyone wants to implement this themselves, just copy the CSS/JS from codepen into your theme or use a browser extension that lets you add custom js/css. I have it load on any url with /wp-admin/ in it. Very handy for me, hope it helps someone else 🙂

  • I do something similar myself, mine includes the fields value return format. In my version I use and acf/prepare_field filter to add hidden content to the field label and the JS is only used to show this hidden information when it is there. I have an admin options page where this can be turned on and off so that I can easily disable it when dev is done. The prepare_field filter checks this option and then output the hidden data if it is on.

    I don’t have an example readily available.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.