Home Forums ACF PRO Widget instance title as a custom field


Widget instance title as a custom field

  • Hi Guys,

    Is it possible to replace the default widget title with a Text field from a field group in a custom widget. Title field have an AJAX callback which instantly show and also save the value near the widget name.

    I tried several ways, but unfortunately i can’t get the right logic to do it.

  • Hi @vasili

    In the update function in your custom widget class, I believe you can get the posted data by using the $_POST variable like this:

    $instance['title'] = $_POST['acf']['field_123456789abc'];

    Where ‘field_123456789abc’ is the field key.

    Hope this helps 🙂

  • @acf-support

    Hi James

    Thank you for your help, i’ll give it a try.

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

The topic ‘Widget instance title as a custom field’ is closed to new replies.