Get Widget ID after drag/drop in admin panel (1 post)

  1. dc_photo
    Posted 3 years ago #

    Hi all,

    I found a similar question here, but it was never answered:

    Basically I need the widget's ID right after the widget has been dragged-dropped in the admin panel.

    I use

    function form($instance) {

    but it only works after the page has been refreshed, or the widget settings have been saved.

    Surely it can be done, as just after the drag/drop this is created

    <div class="widget ui-draggable" style="display: block;" id="widget-6_my_widget-10">

    (with "my_widget-10" being what I want to get)

    Any suggestions? Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic