Form field not populating data from from existing db record in "update / edit records" modal

I have an “update records” form (inside a modal) that doesn’t populate a specific field when the “Update” button is clicked. The modal pops up, the form displays and it even populates one of the fields from the database. But the other field in the form is blank.

It allows me to enter new data into the blank field and it even updates the database but for some reason, I just can’t get the existing data from the db to show in the field when the modal is called.

This is for an image gallery I built based on this tutorial from @ben :
https://youtu.be/o_rZmbZyS14

In this screenshot you can see the “Edit Gallery Details” button and the “test description” data in the “Gallery Description” field in the table above the button.

When I click the “Edit Gallery Details” button, I get this modal pop up. Name of gallery is shown correctly.
The description field is blank (not shown in this screenshot) but it allows me to add a new description in the blank field (I typed “Revised Description” in this screenshot).

After updating the data, it shows my updates in the table and they appear to be valid.

Here is my app structure.

Here is my code.

Any ideas?
Thank you in advance.

Edit: added @ben for tutorial video credit.

Here is the live page:

http://mzimmermanphoto.com/admin/

If you click one of the Gallery Names in the left-hand, striped table, Gallery Details appear.

Could you try removing the MediaEditor by replacing

<textarea id="inp_gallery_Description" class="form-control" name="galleryDescription" dmx-bind:value="ddGallery.data.galleryDescription" is="dmx-medium-editor" placeholder=""></textarea>

for

<textarea id="inp_gallery_Description" class="form-control" name="galleryDescription" dmx-bind:value="ddGallery.data.galleryDescription" placeholder=""></textarea>

Edit:
Reverse the two JS links so that medium-editor precedes dmxMediumEditor

<script src="../dmxAppConnect/dmxMediumEditor/medium-editor.js" defer=""></script>
<script src="../dmxAppConnect/dmxMediumEditor/dmxMediumEditor.js" defer=""></script>

Removing the “dmx-medium-editor” fixed it!
Thank you Ben!

I can’t remember putting that in there though. Did I just accidentally click something when creating/editing my app structures?

Please read the Edit of my previous reply and resurrect the Medium Editor, it will come in handy. :slightly_smiling_face:

Like this?

By the way, thank you for taking the time to build this YouTube tutorial. Very helpful !!

1 Like

Correct and thank you for the feedback, much appreciated. :love_you_gesture: