Get Element ID on Click?

  • /attachments/1314190843162132561/1314190843845935134/Screenshot_2024-12-06_at_12.23.37_AM.png

    Alex

    1 month ago

    I have a form modal that pops up when I click these buttons inside a repeat list.

    How Can I populate the variables in my form with this elements data?

    Because I want to then create an UPDATE flow to submit the form changes to Supabase and PUT an update...
    Screenshot_2024-12-06_at_12.23.37_AM.png
  • Alex

    1 month ago

    Oh I think I fixed it by adding click events to set variables?
  • Chris Laupama

    1 month ago

    Create a variable to store the index of the item you are clicking on.

    Then you can just use that index to obtain the data from that index in the array and pre-fill the values of the input fields of the form.
  • Alex

    1 month ago

    I don't know if my approaches are hacky...
  • Oh, yours sounds way sarter
  • smart*
  • Chris Laupama

    1 month ago

    Your way works fine too
  • Alex

    1 month ago

    oh okay cool haha
  • /attachments/1314190843162132561/1314193160628604958/Screenshot_2024-12-06_at_12.34.19_AM.png

    Alex

    1 month ago

    mean
    Screenshot_2024-12-06_at_12.34.19_AM.png

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.