Support

Account

Home Forums Bug Reports layout_title does not have same dataset when called with ajax

Unread

layout_title does not have same dataset when called with ajax

  • Hey,

    I found a bug in the acf/fields/flexible_content/layout_title filter.

    When the filter runs on load of the page the $field[‘value’] has data. But when you run the filter by ajax it does not have any data in the $field[‘value’].
    Then you have to use $_POST[‘value’] instead.

    
    if(!empty($_POST['value'])) {
      $value = $_POST['value'];
    }
    
    if (!empty($field['value'][$i])) {
      $value = $field['value'][$i];
    }
    
    // now you can use the value on ajax and reload of the page
    $value
    
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.