Wappler Version : Beta 25
Operating System : macos
Server Model: Docker
Database Type: Mysql
Hosting Type:
Expected behavior
After clicking on an internal link the form removes from the appconnect object causing form.submit()
to not work.
How to reproduce
- Create a repeat that repeats over something from the database (in my case right now there's only 1 item returned from the db)
- Add a form inside which is submitted when an input field is changed
- Click on an internal link which triggers a server connect refresh that gives the data the repeat is repeating over
- Trigger the form submit (by changing the input field)
- Nothing happens
- Inspect in console and see:
Before internal link...
After internal link...
This is the code on the frontend, i want to trigger a form submit on changing the text area (which works before the internal link)
<div is="dmx-repeat" id="repeatAssignments" dmx-bind:repeat="lecturePublicRetrieve.data.queryAssignments">
<!-- Assignment wrapper -->
<div class="mt-3">
<p dmx-html="assignmentInstructionsUpdatedSources.newContent"></p>
<form id="formAnswer" is="dmx-serverconnect-form" method="post" action="/api/v1/courses/lectures/assignments/answers/upsert">
<input id="inp_assignment_id" name="assignment_id" type="hidden" class="form-control" dmx-bind:value="assignment_id">
<textarea name="assignment_answer" dmx-show="type == "open"" class="form-control mt-3" dmx-bind:value="answer" dmx-on:changed="notifies1.info('triggered');formAnswer.submit(true)"></textarea>
</form>
<!-- Answer (need to join data still) -->
</div>
</div>