Element does not save value because of js code.

Created on 17 January 2024, 6 months ago
Updated 11 February 2024, 5 months ago

Problem/Motivation

When you selected pick a colour from element and click save then value has been not saved.

Steps to reproduce

Add element to code, pick up a colour and save form.
Then $form_state->getValue('bg_color'); is empty because of some issue in javascript file.

Proposed resolution

Fix js file from
let selected_color = $(this).data('swatch-color');
to
let selected_color = $(element).data('swatch-color');

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇵🇱Poland crafter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024