• voronov13

    (@voronov13)


    Hello.
    I am trying to customize the display of some elements on the page depending on the meta field. In the “User & Role” section, no matter what I write in the dropdown list, the error “The results cannot be loaded.” always appears.

    Please help me to solve this problem.

    • This topic was modified 2 months ago by voronov13.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dynamic.ooo

    (@dynamicooo)

    Hi!
    are you sure that is the name of the field you created? How did you create this field?
    Take a look at this explanation: https://help.dynamic.ooo/en/articles/4952541-dynamic-visibility-triggers-user-role
    I remain at your disposal.

    Thread Starter voronov13

    (@voronov13)

    This is the user’s meta field. It is added by another plugin to some users.
    It’s a plugin I wrote myself. Below is a sample code that changes the value of the “folder_name” field

    function ufm_save_folder_name_field($user_id)
    {
    if (!current_user_can('edit_user', $user_id)) {
    return false;
    }

    if (current_user_can('administrator')) {
    $folder_name = isset($_POST['folder_name']) ? sanitize_text_field($_POST['folder_name']) : '';

    // If "Not Selected" is chosen, set $folder_name to an empty string
    if ($folder_name === 'Not Selected') {
    $folder_name = '';
    }

    update_user_meta($user_id, 'folder_name', $folder_name);
    }
    }

    Take a look at this explanation:?https://help.dynamic.ooo/en/articles/4952541-dynamic-visibility-triggers-user-role

    I tried to enter the field name from the example, but I still get an error.

    Below is a list of current versions of some plugins, maybe it will be useful.

    Dynamic Visibility for Elementor Version 5.0.11
    Elementor Version 3.22.2
    Elementor Pro Version 3.17.1

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.