- Issue created by @Tuuuukka
- @sorabhv6 opened merge request.
- ๐ฎ๐ณIndia sorabh.v6 Indore
I have created the MR. I worked on it for so much time. Initially, I thought I could just add the validation and then I see that element validations are different than form validation itself and event that didn't worked because there was not identifier to know if the element weight is changed.
The better and I think only approach to solve this was doing some checking on the frontend side using the JS.
I am adding the warning message when an element is dragged to save the form before making any changes. Even if user ignores that warning and just click on delete action link for the element then I disabled the delete button and show the same message as error in the dialog modal.
- ๐ญ๐ทCroatia milosr Croatia, Montenegro
I tested it and it works well.
Thank you @sorabh.v6
- Status changed to RTBC
2 months ago 9:44pm 12 June 2025 - ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
liam morland โ made their first commit to this issueโs fork.
- ๐บ๐ธUnited States jrockowitz Brooklyn, NY
@sorabh.v6 I appreciated your work on the JavaScript approach.
I am very hesitant to add all this additional JavaScript when we want to suppress the unexpected and confusing "The submitted value -XX in the Weight for XXX element is not allowed.".
At the same time, if re-orders, doesn't click save, and deletes and element, it is reasonable to that re-ordering is lost. This is how is works with menus and taxonomies.
Attached is patch that addresses the unexpected error.
- @jrockowitz opened merge request.