Form dissappears from appconnect repeat after internal link

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

  1. Create a repeat that repeats over something from the database (in my case right now there's only 1 item returned from the db)
  2. Add a form inside which is submitted when an input field is changed
  3. Click on an internal link which triggers a server connect refresh that gives the data the repeat is repeating over
  4. Trigger the form submit (by changing the input field)
  5. Nothing happens
  6. 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 == &quot;open&quot;" 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>

Please test if the following update fixes the issue:

dmxAppConnect.zip (119.8 KB)

If the fix doesn't work you can add the rerender attribute to the repeat, this will force the items in the repeat region to rerender.

Thanks @patrick that makes it available again and fixes my core problem of the form not submitting!

For future reference as this might be handy... You mean like this?:

<div rerender is="dmx-repeat" id="repeatDownloads" dmx-bind:repeat="lecturePublicRetrieve.data.queryLecture.downloads" >

or is it like dmx-rerender or something?

The sample you've given is correct for the rerender attribute, it can fix some specific issues with repeaters but also has some performance impact since each repeat item re being rerendered.