How to open edit form in modal

How can i open a modal with edit form (passing the ID of the record) from a list of records?

on the docs there is how to inset a new record only.

You can either:

1: Pass a URL parameter and populate your form fields from that
2: (My preferred way) Simply use a Data Detail Region

As for the form itself it is no different than adding an update form on a regular page. It’s all exactly the same.

i added a variable with app connect. i guess its a JS variable.

1 Like

Use the Data Detail method so much simpler than setting variables. Simply add a detail region to your modal body and add your form inside it. On your trigger link/button onClick load the data detail region. Its much quicker and easier to set up than using variables.

Check out this videos for clues. It’s pretty much the exact same thing.

1 Like

I followed this tutorial:


but i know that data detail element have some usage!

Thanks Brad :kissing_heart:

So you got it working then?

Yes
with both ways
and i can see that the data detail element is faster in loading the the information into the form fields

1 Like

Excellent. Good luck with your project!

1 Like

Can you give out a details how this is done? I know how to generate the URL parameter but how do I pass that to populate another form using Wappler and not relying on custom javascript or PHP code?

Well if you are using a modal you should not use an url param to do this. Just use the data detail region.

I cannot locate how to do the Data Binding - the demo says to click inside the Detail Region and shows clicking within the Detail code block (which I assume how this was done in the old DMX extension) but where is Data Binding located in the Wappler App Structure column?

In Wappler the workflow is similar in different components, so if it is repeat or detail region data bindings are the same. You just follow a really simple logic of doing things.

I don’t quite understand what exactly you cannot find, so please better wait a couple of days until I finish and publish the data detail region tutorial, which you can use then.

Sounds good, Teodor. Meanwhile I’ll tackle learning how to Add/Edit/Delete records for the cart.

i can help you its easy
where are you stuck?

I’m following the DMX demo on how to create a Detail Region and have gotten as far as the Data Binding. The demo shows that by clicking within the Detail code block, a Data Binding option displays in the Properties panel. I don’t know how to accomplish this step in Wappler since I do not know how to duplicate this step to get the Data Binding option to display in Wappler.

You dont need to do that if you use the table generator.
but if you want to just switch to the code view and place the cursor within the element you want then the data binding will show on the properties section

Randy, when you double click in an element on your page an inline text editor appears. The dynamic data picker is also there so just use it to bind the data…
Not to mention that you can use inner text dynamic attribute as well.