======== TEMPLATE BUG FORM ========
Wappler Version : 6.2.2
Operating System : Mac silicon
Server Model: nodejs
Database Type: mysql
Hosting Type: docker local and remote
Expected behavior
I commonly display/hide elements when a form state or server connect state is 'executing'. This is super simply in AC1.
Actual behavior
When I try to achieve the same thing with AC2, it opens the filter modal and if I select 'executing' it defaults the selection to 'is set'. Which all seemed fine:
But when I then try to execute this in testing, nothing happens. Then when I visit the expression builder modal again, it has changed to 'equal':
When I use 'is set' this is the code:
<span class="spinner-grow spinner-grow-sm" role="status" dmx-show="about_company_edit.state.executing"></span>
Which is the same code as when trying to use it manually if that helps.
George
February 20, 2024, 3:44pm
2
mgaussie:
When I use ‘is set’ this is the code:
<span class="spinner-grow spinner-grow-sm" role="status" dmx-show="about_company_edit.state.executing"></span>
Which is the same code as when trying to use it manually if that helps.
So the generated code is all fine? Just the reedit defaults to equal while it should be is set.
Teodor
February 20, 2024, 8:19pm
5
I just created a test page and it works just fine in a button inside the server connect form as well as on an element outside the form:
<form id="form1" is="dmx-serverconnect-form" method="post" action="/api/test" class="mb-3">
<div class="form-group mb-3">
<label for="input1" class="form-label">Some text</label>
<input type="text" class="form-control" id="input1" name="input1" aria-describedby="input1_help" placeholder="Enter some text">
</div>
<button class="btn btn-primary" type="submit">Submit <span class="spinner-grow spinner-grow-sm" role="status" dmx-show="state.executing"></span></button>
</form>
<p dmx-show="form1.state.executing">Show this while executing </p>
Maybe check dev tools for errors, or maybe check if your server action actually runs and that it actually takes time for the element to show.
The button and show/hide element are outside of the form.
Yes it runs fine, as I use onclick event to trigger form and the form correctly executes and updates the DB.
It also does take time as it calls an external service in the api
I’ll check for any errors but it works fine on AC1.
Teodor
February 20, 2024, 8:41pm
7
What if you put this expression somewhere on the page after the form:
{{about_company_edit.state.executing}}
Does it return anything before and during form execution?
It displays ‘false’ before I execute the form, and does not change during or after execution of the form.
Execution (successful) takes about 5 seconds (last test 5.82s)
I have also just tested this inside the actual form:
<span class="spinner-grow spinner-grow-sm" role="status" dmx-show="state.executing"></span>Update</button>
Again, there is no show/hide executing.
Teodor
February 21, 2024, 8:09am
10
Do you have any link to this page where we can check this?
Teodor
Closed
May 18, 2024, 4:32pm
14
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.