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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | update_frontend-3467115-2.patch | 1.3 KB | joco_sp |
Issue fork editablefields-3467115
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:
- 3467115-wrapper-for-ajax
changes, plain diff MR !29
- 3467115-update-the-field
changes, plain diff MR !26
Comments
Comment #2
joco_sp commentedPatch for 1.0.2
Comment #4
joco_sp commentedComment #5
erutan commentedI 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!
Comment #7
gilmord@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
Comment #10
gilmord