Adding parameters/values into the DB from a form submit that aren't on the form, e.g. like 'Current User' in Bubble

If you are using node the easiest way would be to add it to your layout file as this one will be loaded always.

1 Like

Thanks @JonL , I am trying to use nodejs - first attempt with Wappler. Can you please elaborate on layout file, I think I’m perhaps structuring things incorrectly.

Right now, I am just creating all my app pages as ‘views’ - should I instead be creating say the standard ‘app’ page as a layout, e.g. simple the header / footer and left menu panel - and that’s a layout?

Would you mind please helping me to understand the difference between views / layouts / partials - before I go too far!

You actually explained it pretty well. It seems you got the basics well covered :slight_smile:

There are three official doc tutorials in the forum that cover the differences and how all of them connect. A simple search will pop them out. I am on mobile at the moment so not very helpful.

1 Like

Thank you for this. I found those articles - I’ve scrapped the old project and rebuilding ‘correctly’ now! This will absolutely speed things up too so i’m really grateful.

3 Likes

Hey JonL, I’ve tried to do this - but for some reason when I’m not getting the data option with the dynamic data picker when relying on the template. If I then add the exact same server connect to the content page then I have the option to pick the content.

What I tried:

  1. Create the server connect server action and save the file.
  2. Layout Page - Add the server connect to the App Connect

I then go to the page in ‘view’ which relies on the layout page and try to use dynamic data but it doesn’t appear as an option.

I then add the exact same server action file to app connect on the content page itself and it works fine.

I’d like to like you say, add it to the layout page so it works for all but I must be doing something wrong?

That is something that Wappler team should probably improve. Accessing layout SC bindings from content pages. (@george)

As a workaround, I am pretty sure that you can access the data if you add the code directly in the content page so sc1.data.whataever

3 Likes

Thanks @JonL this is what I’m now doing, form herein - until it’s accessible via the layout pages.