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.