· Owner at No Black Swan

Dropdown in Webflow Not Populating with Data from Xano (Using Wized V3) | Wized Integration Issues

Hey!

Title says it all..

What We Have Working:

Xano API: A GET request that successfully returns an array of companies:

[{"name": "NBS"}, {"name": "PBIX"}, {"name": "CBI"}]

Wized Setup:

  • API request (get_companies) successfully pulls data into v.companies_list.

  • Running Wized.data.v.companies_list in the browser console confirms the array is available.
    Webflow Setup:

  • A Select dropdown inside a form.

  • It has a w-el="companies_list" attribute.
    Manual Debugging:

  • Running this script manually in the Console successfully updates the dropdown:

    (async () => {
        const dropdown = document.querySelector('[w-el="companies_list"]');
        if (!dropdown) return;
    
        dropdown.innerHTML = '';
        const defaultOption = document.createElement("option");
        defaultOption.value = "";
        defaultOption.textContent = "Select a company";
        dropdown.appendChild(defaultOption);
    
        const companies = Wized.data.v.companies_list;
        if (!companies || !Array.isArray(companies)) return;
    
        companies.forEach(company => {
            const option = document.createElement("option");
            option.value = company.name;
            option.textContent = company.name;
            dropdown.appendChild(option);
        });
    
        console.log("Dropdown populated successfully!");
    })();
    
  • This confirms the data exists and the dropdown can be modified dynamically.

Where We Are Stuck:

🔴 The dropdown does not populate automatically on page load, even though:

  • The API request runs successfully.

  • The data is correctly stored in v.companies_list.

  • The dropdown exists and has the correct w-el attribute.

  • The manual script works, but our Wized "Run Function" event does not.

What We've Tried:

  1. Adding a "Run Function" action in Wized after setting v.companies_list.

  2. Ensuring the function runs after data is available by checking v.companies_list.

  3. Using await new Promise(resolve => setTimeout(resolve, 200)); inside the function to delay execution.

  4. Manually running Wized.render() (returns error).

  5. Checking if Wized.el("companies_list") works (returns error in Wized V3).

What We Need Help With:

💡 How can we properly update the Webflow dropdown automatically using Wized V3 once the API response is ready?

  • Is there a better way to bind v.companies_list to the dropdown?

  • Are there known issues with Run Function in Wized V3 for dynamically updating elements?

  • Should we be using a different approach to trigger dropdown updates?

Thank you so much. Some screenshots attached..


2 replies