Form update flow

Is there a way to see transactions sent to the server when you update a form? I think I have everything set up correctly but the form info doesn’t always update.

If you look at the video you will see what I mean. I don’t know how to fix something that works sometimes??? What am I missing?

Update Issues-.mov (6.8 MB)

Tom

Hello Tom,
Please provide a link to this page, where we can check how’s your page setup.
Meanwhile - are you sure you run the refresh data server action on success event of the update action and not attached both of them on button/on submit?
On submit only the update action must be executed and that’s done by using a server connect form (i.e. it auto executes it) so no other events should be bound to the button.

http://php.altimages.com/jrhoops/add_scores.php

Well as I suggested - you have two events attached to the save button in the modal and one of them is some redirect to the same page, the other loads some action:

dmx-on:click="serverconnect_getLast10Scores.load({},true);browser1.goto('add_scores.php')"

No events should ever be used on a submit button!
Also what’s the purpose of redirecting to the same page? And what is the other event trying to load?
What did you try to achieve there?

Basically, I just have 1 page to add a new score to the database and edit the last 10 that have been already entered. The bottom part of the page that list the scores is just a table that retrieves the last 10 scores entered. I thought I needed to reload the page to see the changes that were made in the modal or it would just show the old info.

No, that’s not the old DW server behaviors that needed to reload the page so you can see your changes.
With Wappler you can reload parts of the page and not the whole page.
As it is explained in our tutorials you need to use the dynamic events for this. Please remove all the events from the submit button.
So as explained in the docs:

  1. Select your server connect form in the App Structure.
  2. Add new dynamic event > server connect > success
  3. Select action:
    a) Your server action, which brings the data on the page > load
    b) Your modal > close

That’s all.

2 Likes

Thanks. I’ll try it now.

Tom

1 Like

OK. I think I was able to get it consistently working now. I appreciate the quick help.

Thanks,
Tom