Hi!
After you start adding content to a widget, the widget description field updates with a preview of the content within, as far as I can tell this is always pulled from the very first top-level widget field.
I was wondering if there’s a way to target a particular field to pull this information from? similar to how ‘item_label’ can be targeted in a repeater. Often my custom widgets have their key content within a section so I’d like to be able to select which specific field to pull the info from, especially on large pages with many of the same widget!
Thanks!
Hi James,
You can use
panels_title
to do this. This is set in the the $widget_options array.Hi Alex, could you provide an example of how I’d tell this what field to use for the description?
Hi James,
Regrettably, I’ve mistaken this setting for the different unrelated setting. I’m really sorry about that!
This field doesn’t allow a selector, but it does allow you to set a manual (static) widget title. I’ve marked this thread as a feature request. We often look through these threads to get ideas for what to add in our future updates. Hopefully, we’ll be able to add this in a future update. I’m really sorry for the misunderstanding on my part!
No problem, it’d be really useful so I hope it’s something you’ll consider :)
Hi James,
Thank you for your feedback! We really appreciate it! :)
Hi again, found a workaround for the time being, I’ve created a text field at the top of my widgets, hidden it with CSS, and use jQuery to populate it with content from my field of choice on change, good enough for the moment! :)
Hi James,
It’s great to hear you found a solution that works for you! :)