Create / Update Form Variables

  • alexsiale_17363-1317397556426182726

    Alex

    4 months ago

    I’m wanting to master forms as I am about to build a whole lot of forms for our CRM build.

    Object Variables
    Input / change events

    Who’s got the video or other help thread or advice for me?
    1317397557105918022-IMG_4629.jpg
  • tomthebigtree-1317401113284186133

    Tom Ireland

    4 months ago

    There’s a few ways to skin a cat here. You can use single variables for something simple like a signup form or where the form takes only a couple of inputs. Objects are better for larger collections of form data. I’d set any new form value to an empty string to removed “undefined.
  • tomthebigtree-1317401461876981770

    Tom Ireland

    4 months ago

    I’d be happy to record an example for a profile form I’m working on if it’s helpful? I think @NoCode ProCode also covered objects in forms in his global variables video and there are countless examples in the toddle YT.
  • alexsiale_17363-1317408510991929345

    Alex

    4 months ago

    yes please if you're willing to?

    I'll watch his video in the mean time.

    My forms will have 10-40 values... objects is definitely my route.

    My main issue is just best practice for the change events etc and when to use a variable / direct API data point etc
    👍1
  • alexsiale_17363-1317415694874181683

    Alex

    4 months ago

    Just watched @NoCode ProCode YT on globals. That was perfect, I hadn't seen it that way, makes it way more streamlined.

    So, last question before I build all these forms: He sets hard coded values to showcase the refresh states etc. Would I then just connect my API data to the initial state object, for UPDATE/EDIT forms, so they can have their info prepopulated?

    I assume that as I submit the users forms and POST or PATCH my supabase, the values coming into the UPDATE/EDIT forms will then be up to date info based on their last profile edits from the form submission?

    Make sense?
  • alexsiale_17363-1317424154240094208

    Alex

    4 months ago

    Hmmm, how would I do this intial state using an API?

    Users will only have one 'developer profile' but they may have 3-100 'projects'. How do I set an inital state, if the values are going to be dynamic depending on what item within an array they click?
  • alexsiale_17363-1317424724132761680

    Alex

    4 months ago

    SET global_form_variale on 'click' ? Could wokr
  • alexsiale_17363-1317427116949897266

    Alex

    4 months ago

    On the FORM POPUP BUTTON 'click' event, is this an appropriate way to set the form input values? I'm just trying to learn ha
    1317427116756832306-Screenshot_2024-12-14_at_10.44.13_PM.png
  • tomthebigtree-1317431583657037854

    Tom Ireland

    4 months ago

    I just did a wee video but binned it as was rambling a bit. Having another go.
  • alexsiale_17363-1317432185715949579

    Alex

    4 months ago

    thank you
  • I'm not sleeping until this is done hahah
    😂1
  • alexsiale_17363-1317443410751258694

    Alex

    4 months ago

    I figured it out!!! And its passing to my database and feeding back instantly YAY
  • I can sleep lol
  • tomthebigtree-1317444191143333979

    Tom Ireland

    4 months ago

    Wahooooo!!! Well done, sir. 🙌 Go get some rest. I'll share my updates to my form as well so you have some other approaches to consider. Was just sorting out an issue with country selection, which I nailed. FYI - If you're try to hide a list of countries (or anything else) on blur (clicking an item or clicking outside of the list area), use mousedown instead of click for your item selection because mousedown is fired before on blur. This will ensure the variable value is saved from your selection and you hide your list as well.
    💪1
  • tomthebigtree-1317459635170578462

    Tom Ireland

    4 months ago

    As promised, here's a video (20 mins) on my form stuff. I added 2 extra short ones to the end to correct a mistake at the end of the first one and another to encourage cleanup using the issues panel. 😉

    https://www.tella.tv/video/form-building-with-alex-39xa
    ❤️2
    🔥1
  • alexsiale_17363-1317657897328705586

    Alex

    4 months ago

    awesome thanks for this Tom!! Great video
  • alexsiale_17363-1317772507817705563

    Alex

    4 months ago

    @Tom Ireland - whats the difference between 'mousedown' and 'click' ?
  • I'm going to building a list input now like yours, I need about 7 differrent ones hahah
  • be good practice
  • alexsiale_17363-1317780495760756807

    Alex

    4 months ago

    Look at me go! I did it @Tom Ireland 🗒️
    1317780495555100712-Screenshot_2024-12-15_at_10.08.35_PM.png
    🙌2
  • tomthebigtree-1317813065281966161

    Tom Ireland

    4 months ago

    Mouse down is fired when you first press the button down as opposed to click which is press and release. Mouse down fires before blur so it helps with capturing the value of something before focus is lost.

    Your project form looks ace!
    ❤️1
  • alexsiale_17363-1317992042244341790

    Alex

    4 months ago

    @Tom Ireland https://www.tella.tv/video/building-a-crm-with-conditional-filters-0xe4

    I created some conditional filtering for inputs across the form, pretty cool. Users can select a region, then select a city from a filtered list of only <region_selected> cities.

    Nice UI trick
    🔥1
  • 1235848107946672168-@Alex
    @Tom Ireland https://www.tella.tv/video/building-a-crm-with-conditional-filters-0xe4

    I created some conditional filtering for inputs across the form, pretty cool. Users can select a region, then select a city from a filtered list of only <region_selected> cities.

    Nice UI trick
    tomthebigtree-1318104006874107965

    Tom Ireland

    4 months ago

    This is looking great, Alex! Nice work, sir. I love how the dropdowns populate based on the previous option selected. 💪

    Resizing a text area is an easy fix for you. See https://www.tella.tv/video/cm4qnn0vv00100al56sp83hf9/view
  • alexsiale_17363-1318111451441004615

    Alex

    4 months ago

    It now filters for Region > City > Suburb

    Now to figure out multi file upload to Supabase
    🙌1

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.