JonL
April 28, 2020, 4:08pm
1
As far as I know, once you submit the form(button or enter) you are making the SC call.
I’ve been trying to fiddle with AC flows in order to run one on form submit and after some steps in the flow submit the actual form with the data. I haven’t progressed much to be honest.
Is there a way to do this?
Use case: when a condition meets I want to show a popup with additional information on submit. Then after the user confirms he understands the information a clicks another button the form would be finally submitted to SC.
brad
April 28, 2020, 4:12pm
2
This tutorial may give you a push forward. Should be the same for any Server Action.
You can add a Bootstrap 4 styled confirm dialog when deleting a database record, using the Flow Component and Bootbox Dialogs integrated in it. This way you can avoid accidentally deleting records.
On our page we added a dynamic table, listing the records from our database. We added a simple HTML button in one of the table cells, which will be used to delete the selected record.
Setting up Delete Record Server Action
First we need to create a delete record server action. Open the Server Conne…
2 Likes
JonL
April 28, 2020, 4:19pm
3
Thanks @brad
I missed that tutorial, but funny enough I was actually following the same steps. Makes me happy knowing I was following the “wappler” way
Anyway, I now understand why I was getting nowhere. There seems to be a bug with flows.
No input parameters available for SC, ergo I wasn’t able to POST the form data.
@George I believe this is your area
Teodor
April 28, 2020, 4:25pm
4
Have you defined the parameter(s) in the flow, under $param?
Teodor
April 28, 2020, 4:29pm
6
And have you defined Get variable(s) in your server action?
Teodor
April 28, 2020, 4:33pm
8
Then we call George indeed
1 Like
TomD
April 28, 2020, 4:48pm
10
I see input parameters in the Flow Editor:
JonL
April 28, 2020, 4:50pm
11
Can you fill them with dummy bindings and paste the code?
George
April 28, 2020, 4:50pm
12
I also have no problems in seeing the Server Connect input ($_GET) parameters in the Flow SC action:
What is different with your case?
JonL
April 28, 2020, 4:51pm
13
It’s an inline flow.
I also don’t see the output action.
TomD
April 28, 2020, 4:52pm
14
serverConnect: {
url: "dmxConnect/api/stock/all_items.php",
params: {offset: 0, limit: 10, sort: "title", dir: "ASC", search: "searchterm"},
name: "sc1",
output: true
}
1 Like
TomD
April 28, 2020, 4:55pm
15
JonL:
It’s an inline flow.
I think that’s the issue. I’ve just tried with an inline flow - and I see the same problem as you: no parameters can be entered.
1 Like
JonL
April 28, 2020, 4:56pm
16
Thanks for helping pinpoint!
I am trying to run the inline flow on the form submit event.
George
April 28, 2020, 5:22pm
17
hmm good catch - seems there are some problems with inline flows getting the input parameters of Server Actions. Will investigate.
Btw it is advisable to use page flows instead of inline flows for larger actions like ones containing Server Connect and more than one step.
1 Like
George
April 28, 2020, 5:37pm
18
Anyway - found the problem and it will be fixed in the next update.
It’s easier to search when it is well pinpointed @JonL - thanks!
1 Like
Teodor
April 30, 2020, 4:55pm
20
This has been fixed in Wappler 2.8.4
1 Like