Pricing Blog

Help forum

  • funktionalized-1293225371097104384

    Funktionalized

    11

    9 months ago

    API Call Method being passed as "options"
    I have a post request that is using the cloudflare proxy to make a request to a fastapi endpoint. When the proxy sends the request for some reason it is using a method called "options" and it is causing a 405 method not allowed error.

    I have the API Call setup as a post request in toddle.
  • uunicode-1293219190509142097

    unicodes

    7

    9 months ago

    repeat item issue (difficult to explain)
    I have a component and I repeat this component based on the data fetched by db. It is a sales tool and fetch companies information. For each repeated component I change the status.

    leads:
    - (1 position) apple: status: "new"
    - (2 position) microsoft : status: "new"
    - (3 position) tesla. : status: "new"

    For the second position, I'm changing the status. The status is included in the component "lead", the status it self is a component with variables.

    I'm editing the status of to the lead Microsoft:

    - (1 position) apple : status: "new"
    - (2 position) microsoft : status: "Prospect"
    - (3 position) tesla. : status: "new"

    I'm working on the lead and I'm not saving it because I want to continue after adding the new lead (i'm not refreshing the page).

    Now, without refreshing the page I'm adding a new lead.

    Leads:
    - (1 position) Intel: status "new"
    - (2 position) apple: status: "prospect"
    - (3 position) microsoft : status: "new"
    - (4 position) tesla. : status: "new"

    Adding the new lead means recalling the API Lead loading.

    Where is the issue?
    The API Lead loading fetch the correct information from the DB:
    - (1 position) Intel: status "new"
    - (2 position) apple: status: "new"
    - (3 position) microsoft : status: "prospect"
    - (4 position) tesla. : status: "new"

    but on the repeated item I have:
    - (1 position) Intel: status "new"
    - (2 position) apple: status: "prospect"
    - (3 position) microsoft : status: "new"
    - (4 position) tesla. : status: "new"

    What is happening is that the variable doesn't reset the value as it should because was rendered again the component, but stay with the previous value and stay for the position 2 of the rendered items, even if it should go down on position 3.

    This is happening because on loading of the component I'm not reseting the variables values or is more something that it should be seen from toddle side?
  • tomthebigtree-1293113677947605024

    Tom Ireland

    7

    9 months ago

    Help on Sleep behaviour
    I'm trying to debounce text input storage for a specific period of time e.g. 3s (3000ms) and after that time passes, append an object to an array with the text content. I have an on input event that gets an element by id and the textContent and stores it in a variable. All good. After 3s, I then take that text content, store it in an object and append it to an array.

    Weirdly, after 3s, it adds an object per character press. For example, if I type "The", it will append 3 objects to the array after the tick. Is that expected?

    If so, how would I only add the one object after 3s. The goal is that I'm debouncing continuous typing, however when there is a pause, I want to update my array (change buffer/history stack) so that I can capture all of the continuous typing up until the pause.

    I can't use other events like on blur, focus out, etc., to update the array because I want to remain focused on the current element and continue typing after my pause.
  • darren_alderman-1292572370241978388

    Darren

    4

    9 months ago

    Any tips on how to get this popover to stay on the screen?
    I have a little pop over box where users can select another color, but if it's on the edge it goes off the screen.
    Any tips to make it more dynamic and adjust it's position if it can't show fully on the screen?
    Here's a demo: https://guides.darrenalderman.com/recordings/F10mlY8Uzz2hIPR7S0a0
  • funktionalized-1292567839592681532

    Funktionalized

    8

    9 months ago

    Variable not being set after get request
    I have an API call that fetches data when a form is submitted. However, the response is not being set correctly and is returning null, even though I am setting the variables upon a successful call. I am also using a proxy for this request. Could there be something I'm doing wrong? What might be causing the response to return null?
  • benjamin.h-1292530954962731038

    Ben H

    2

    9 months ago

    Question about best practices using tags inside components
    When working inside components, should I use tags like "Main" or "Header" to indicate the main part of a component or the header of a component, even if the component itself may be used outside of a page's main or header sections? In other words, should I reserve "Main" and "Header" tags for the root page, or is it best practice to use these tags within components as well to denote hierarchy within components?
  • neville9288-1292489006126203003

    Neville

    5

    9 months ago

    Variable not set in live version?
    Hello folks,

    I'm setting a variable after in an API call on success. This works fine in the dev environment, but does not work in the live version.

    I'm displaying the API result data (from which the variable is set) as well as the variable value on screen. I can see the correct value from the API call and the variable is set correctly in the dev environment, but not in the live version.

    Has anyone seen similar behaviour?
  • reallifemonkey-1292462203106234440

    RehLifeMonkey

    4

    9 months ago

    Save Spark Drang and Drop via API
    Hello everyone,

    I use directus as a backend and would like to save the order of my drag and drop list. Unfortunately, I keep coming up against limits here: directus only accepts PATCH calls with which you can only change one value for several data sets and I have not yet found out how I can process a list of objects one after the other with an API call in toddle.

    Have you already found a solution for these problems or do you save your lists completely differently? I would appreciate a exchange on this!
  • bsweileh-1292194125545865216

    Belal

    22

    9 months ago

    Editor-only components/elements
    Hi. Is it possible to create editor-only elements or components? For example, if I were to create a parent component in Toddle containing sub-elements or child-components (e.g. drop downs, buttons, checkboxes, file import dialog, etc), which are only meant to configure the settings of the parent component, can I make those editor-only? Meaning, would I be able to dynamically manipulate those sub-elements / child elements in the Toddle editor to configure the parent component but make them hidden/removed on the live site?

    My inspiration comes from the new Rive plugin in Framer which sits on the Framer canvas and can be used to configure the Rive animation, and as it does so, the Rive element’s properties (in the details panel on the right are modified accordingly). This Rive plugin floating window can be seen in the Framer editor but is not seen on the live site. See attached video. Thanks!
  • needtheanswers-1292159069460889652

    needtheanswers

    5

    9 months ago

    how do I pass on multiple values when using a custom event?
    I have a component with an input field. On input I trigger the event that passes on the data. I would like to pass on the value of the input and the index. If I pass on either the input value or the index I don´t have a problem accessing the data but how can I pass on multiple values?
    Thanks a lot
  • bsweileh-1291834347862888552

    Belal

    3

    9 months ago

    Is there a way to narrow the scope of the possible values that a component's attribute can take?
    When setting a component's attribute from outside the component, I noticed that users are allowed to freely input any value they wish even though some attributes should be limited to only a few possible values. For example, while any truthy and falsy value can become a boolean in Javascript, in many cases, an attribute of type "boolean" should be limited to only two values: true and false (or "yes" and "no" - or some other set of two possible values). Similarly, if an attribute was responsible for specifying the component's "layout", there are likely only a handful of values that this attribute should take. Additionally, there are cases when the set of possible values for an attribute are determined by some external file's contents (e.g. the contents of a Rive file dictate what artboards, state machines, and inputs are present in the Rive animation, and many of its configuration options like "autoplay", "fit", and "alignment" only take a handful of values). Is there any way to limit a particular attribute's value to a small set of possible values and then the user only needs to select it via a dropdown or a toggle? Thanks.
  • mesmoiron-1291729648262320139

    mesmoiron

    5

    9 months ago

    unable to find file to import
    Sorry, I don't get it. When I use the import page function; it works sometimes and mostly not. So, I copy and paste a lot of the information, but I still don't know why it refuses and in which circumstances.
  • mesmoiron-1291395168678838353

    mesmoiron

    5

    9 months ago

    Draggable element - When to use event formula, normal formula or a workflow?
    Hello,

    I am working on making elements move/drag over the canvas with the example of W3Schools
    https://www.w3schools.com/howto/howto_js_draggable.asp

    I tried to rewrite the code into event actions and then create a workflow. This didn't work out, mostly because I don't quite have the intuitive feeling when to use actions, formula and workflows and script tag. I have moved the code into the script tag section. It works finally ;-). But I am still puzzled about it. Can I move the code from the script into an onload event? The bigger question behind my questions is: how to think in a Toddle way when rewriting code. Maybe we can have a new awesome video about that? Please 😺
  • reallifemonkey-1291130476622250034

    RehLifeMonkey

    8

    9 months ago

    Error during authentication
    Hello everyone,

    As a newbie to Toddle, I'm in the process of building my first small but nice app with Toddle. As backend I use a self-hosted version of directus (11.1.0). During user authentication (login) to get an access token, I always get an error message “error code: 1003. After some trial and error, I found out that this only occurs with an API call from Toddle. Both mocks with SoapUI or other web apps work without problems.

    Have any of you ever had this behavior or maybe even know the solution to this problem?
  • billyfrench.-1291117224710635590

    billyfrench

    3

    9 months ago

    Scrollbar customization?
    Howdy. I see there's a CSS editor, and it seems to respect scrollbar-width, but that's about the only property I've been able to change. Is webkit supported somewhere / somehow?

    Thanks!