PricingDocsAcademy
Bluesky ...
Fri, Dec 13, 8:48 AM

Duplicate Child Component From Parent

  • /attachments/1309409325478838303/1309409326712229930/image.png

    Matt

    21 days ago

    Hey guys,

    I'm completely new to toddle and am trying to set up a 'habit tracking' component that can create new child 'habit components' when a user click the 'add habit button'.

    I've set up a click event on this button and believe i need to set up a repeat formula on the child component but can't seem to get it working! Any advice would be much appreciated.
    image.png
    image.png
    image.png
  • Lucas G

    21 days ago

    To repeat, you'll need a array. Create a habitList variable for example (initial value should be an empty array) and on button click, append the new habit to the list
  • I see you are trying to write a formula in the value
  • Use that field only if you want to set a string or number
  • Use the formula button to the right of the field to set up the proper logic
  • You'll see an Append node in the formula list
  • Matt

    20 days ago

    Hey Lucas!

    Thanks for this. I'm still a bit lost unfortuantely. Would you be able to send through a couple of screenshots with a basic example of this?

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.