Help forum
- Can I Optimize? Reducing Repeated Use of Map in Formula to Set 2 Values
KillerK009
2 6 months ago
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
} - When release web awesome on toddle ?
Lucas TSD®
1 6 months ago
When release web awesome on toddle ? - Meta auth No longer Server Side rendered
Kleveland Bishop
9 6 months ago
Hello toddle team , I am using a - Signup/login supabase template
ssssadsadasd
10 6 months ago
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 - Styling Question
jackson
19 6 months ago
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 ! - sticky not working :(
unicodes
3 6 months ago
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 . - API Data shows only in Toddle
vanishklift
74 6 months ago
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 ? - Shadow for svg
Vizualinx
4 6 months ago
How can i set a shadow for a svg (icon ) ? - redirect setup in toddle vs xano?
needtheanswers
0 6 months ago
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 ? - get User info in all pages (no possibility to edit)
unicodes
3 6 months ago
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 ? - Image element not rendering image on load via api
A-Chivas
7 6 months ago
mage element not rendering image on load via api even after having a url set , check the image attached here - How to keep original properties in an array and just add new ones to each element?
KillerK009
5 6 months ago
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 . - get Keys names of object not value.
unicodes
2 6 months ago
Hi , I want o get the keys names (on repeat ) and not the value . Is there a way to get it ? Thank you ! - Using style variable to set alignment
Dov
3 6 months ago
Hi . Is there a native way to set alignment (in my case a td ) based on a style variable ? Thanks - HTML element for SEO blog post
Matthieu B.
55 6 months ago
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 ?