Pricing Blog

Help forum

  • feraask-1326694782730240031

    KillerK009

    2

    6 months ago

    Can I Optimize? Reducing Repeated Use of Map in Formula to Set 2 Values
    I'm trying to calculate and add 2 new values (tag and label) to every element in an array where the 2nd new value (label) is dependent on the value of the first (tag). Is it possible to set them both in 1 iteration of the Map function?

    For example, I use the Map function, do some calculation for every element, then Set the tag value first. After this but still in the same iteration of Map I want to use this newly calculated tag value to also set the label on this same element. Can I do this in a Toddle formula without having to use Map and iterate over the entire array again?

    Not a huge deal for what I'm dealing with right now since the arrays are pretty small and it performs it quickly enough, just wondering if it's possible to do it more efficiently or if I should even concern myself with trying to be as efficient with my formulas.

    I'm used to traditional coding so looping over the same array twice in a row doesn't feel right to my brain 😅 , I'd instead just use a loop like this:
    foreach (element in array) {
    element.tag = calculateTag() // calculate tag
    element.label = calculateLabel(element.tag) // calculate label based on tag value
    }
  • thesuperdesigner-1326644180285394997

    Lucas TSD®

    1

    6 months ago

    When release web awesome on toddle ?
    When release web awesome on toddle ?
  • klevelandbishop-1326531339758866546

    Kleveland Bishop

    9

    6 months ago

    Meta auth No longer Server Side rendered
    Hello toddle team, I am using a
  • ssssadsadasd-1326509571786674236

    ssssadsadasd

    10

    6 months ago

    Signup/login supabase template
    How can we access the signup/login with supabase app built in [this video](https://www.youtube.com/watch?v=Ol-rANqDclI&ab_channel=toddle) or is there a template with signup/login with supabase? none of the other templates has a signupl/login functionality. thanks
  • jreed5-1326406229525921855

    jackson

    19

    6 months ago

    Styling Question
    I created a class "clicked" and began styling it by clicking on the "clicked" class under Styles. However, that style also changed the "default" even though I didn't have it highlighted. Is this a bug or am I doing it wrong? I've attached a 12 sec video where the hover works but when the default is highlighted, the button colors do not match the colors selected (they are opposite). Any help would be much appreciated, thank you!
  • uunicode-1326369421706399806

    unicodes

    3

    6 months ago

    sticky not working :(
    I want to make the image stay sticky to the blue parent.

    The blue parent and right childrens are stored in a parent container with a maximum height and vertical scrolling (scrollY). There is no hidden overflow or anything like that, but sticky doesn't work.
  • vanishklift-1326318360509550654

    vanishklift

    74

    6 months ago

    API Data shows only in Toddle
    Hey everyone!

    I’ve connected one API endpoint without any input, and it’s displaying correctly both in the Builder and on the branch site in Chrome. However, the API endpoint where I provide an item_id to retrieve only objects matching that item_id is behaving differently. It shows everything as expected in the Builder but doesn’t display anything on the branch site in Chrome.

    I hope this explanation makes sense! Any ideas on what might be causing this?
  • elli4931-1326284569694961774

    Vizualinx

    4

    6 months ago

    Shadow for svg
    How can i set a shadow for a svg (icon)?
  • needtheanswers-1326167706659196980

    needtheanswers

    0

    6 months ago

    redirect setup in toddle vs xano?
    Hi,
    I was just wondering if it is better to set my redirect rules in toddle or directly in xano? Is it "safe" to do that it toddle? Also how do I allow my clients to use their own domain for the redirects (whitelabel solution) instead of my domain?
  • uunicode-1326106297954992179

    unicodes

    3

    6 months ago

    get User info in all pages (no possibility to edit)
    Currently, I have an API call to fetch user information for all pages. The challenge is that if any changes are required, I have to update the API calls for all pages individually. I’d like to avoid storing user information in cookies, local storage, or session storage, as some checks involve user categories (e.g., certain user categories may or may not be allowed to view specific content and want to avoid user edit).

    The API I’m using is an RPC (no input) that retrieves user information based on the JWT. A function extracts the auth_id and then fetches all user details.

    I was considering implementing a component (like the menu or even an empty component) that calls the API internally and returns the required values. Another idea was to use context, but I’m unsure how to retrieve the output effectively when using context.

    What solutions do you typically use for this kind of scenario?
  • achivas-1326065334733770833

    A-Chivas

    7

    6 months ago

    Image element not rendering image on load via api
    mage element not rendering image on load via api even after having a url set, check the image attached here
  • feraask-1325975941423435868

    KillerK009

    5

    6 months ago

    How to keep original properties in an array and just add new ones to each element?
    Is there an easy way or shorthand in a Toddle formula to take every object in an array and just add an additional value/property to each one while retaining all the existing values? I asked the Toddle AI and it mentioned using the Map function and ...item to spread the properties but I don't understand what this means exactly or how to do so in a Formula.

    Does this just mean mapping each item to a new object and having to re-define the key/value pairs for every property again like I did in the attached screenshot? This isn't a huge deal on a smaller object with only a couple properties per element, but when there are many values that all need to be mapped to the same thing again it feels very tedious.

    For example, I have an array of exercises in my workout program and I want to go through every exercise in the array and add a tag property (where there's some formula to calculate the tag value).

    So if my exercise array is like:
    [
    {
    "muscleGroup": "Chest",
    "ID": 1,
    "exercise": "Bench Press, Barbell"
    },
    {
    "muscleGroup": "Front & Side Delts",
    "ID": 2,
    "exercise": "Lateral Raise, Dumbbell"
    },
    {
    "muscleGroup": "Chest",
    "ID": 1,
    "exercise": "Bench Press, Dumbbell"
    }
    ]


    I'd like the output to be:
    [
    {
    "muscleGroup": "Chest",
    "ID": 1,
    "exercise": "Bench Press, Barbell",
    "tag": 0
    },
    {
    "muscleGroup": "Front & Side Delts",
    "ID": 2,
    "exercise": "Lateral Raise, Dumbbell",
    "tag": 0
    },
    {
    "muscleGroup": "Chest",
    "ID": 1,
    "exercise": "Bench Press, Dumbbell",
    "tag": 1
    }
    ]


    So I keep all the original properties and values and just add a tag to each element.
  • uunicode-1325886122265546812

    unicodes

    2

    6 months ago

    get Keys names of object not value.
    Hi, I want o get the keys names (on repeat) and not the value. Is there a way to get it?

    Thank you!
  • jubilant_courgette_93644-1325789579906650184

    Dov

    3

    6 months ago

    Using style variable to set alignment
    Hi.

    Is there a native way to set alignment (in my case a td) based on a style variable?

    Thanks
  • matt_apollodev-1325531071261053008

    Matthieu B.

    55

    6 months ago

    HTML element for SEO blog post
    Hello toddlers

    I’m using toddle for my website and blog.

    I’ve used HTML element but in order to render my style, I need to set inline style, making the length of the html formatted text way longer.

    Any recommandation to optimize the page for SEO ranking ?