Problem/Motivation

When you are using the "Form in popup" the field on the front end is not updated (refreshed), because the .field element doesn't exist. Therefore the AJAX AppendCommand can't replace anything.

Steps to reproduce

  • Use the "Form in popup".
  • Add a new value to the field.
  • After submitting the form in the modal window, the front end field is not updated.

Proposed resolution

If there is no value added to the field, append the <div class="field"></div> to the .editablefields-popup element.

CommentFileSizeAuthor
#2 update_frontend-3467115-2.patch1.3 KBjoco_sp
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joco_sp created an issue. See original summary.

joco_sp’s picture

StatusFileSize
new1.3 KB

Patch for 1.0.2

joco_sp’s picture

Status: Active » Needs review
erutan’s picture

Status: Needs review » Needs work

I tested this on Drupal 10.3.6 and Editable Fields 1.0.2.

Both empty text area and file fields with "Form in popup" set would not update the contents of the page after adding in new content and submitting the form modal. This would solve an annoying issue!

gilmord’s picture

@joco_sp thanks for try, but I closed the merge requests, I think we need another approach
$entity_before = $this->entity; does not contain initial data

I think we should add a wrapper and replace it instead of '.field' selector

  • gilmord committed dfbf4692 on 1.0.x
    #3467115 - added wrpaper so even empty fields can be replaced with ajax...
gilmord’s picture

Status: Needs work » Fixed
Issue tags: +LutskGCW25

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.