-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock the field data name during editing the title #82
Comments
I've reviewed this ticket and fixed it here - #362 |
@girishpanchal30 seems like you are making that readonly, I want to avoid those to sync when there is a value already saved, people can still change it if they want, but only if they change that field and not the title one. |
@selul I attempted to avoid syncing when saving data, but it isn't possible because I also tried retrieving the existing So I've just made it read-only and skipped the field update while editing the title. |
@girishpanchal30 I'm not sure if I get the issue, this looks like a frontend JS issue and has nothing to do with changing how we store the data or PHP side? The logic is simple from my end, when editing an existing field, we can disable the js that changes the data name when I edit the title? Am I missing something? |
On the PHP side, data is saved in a serialized format along with the POST data.
I've disabled it when the field is in read-only mode. Here - b99a862#diff-44d139997568d1760113b5cad31792552415b4df27e795b0dfcbc21f36f4f024R994 |
@girishpanchal30 instead of making it readonly, we can allow editing it when the user is directly editing that. RIght now there is no way to change that name, which he was able to do before. |
@selul I've removed the |
@girishpanchal30 now when I add a new field, to an existing group, when writing the title the data is no longer being added automatically as before. |
@selul Fixed it with the latest commit. |
🎉 This issue has been resolved in version 33.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Currently, when you try to edit a field title; the dataname is changed as automatically. That's good for the fresh fields, but it's not good for editing the fields.
That dataname is saved in order item meta, therefore if the dataname of the field has been changed, it affects lots of places:
https://vertis.d.pr/i/pIi5TB
Proposal
When we are in the edit screen, we should disconnect the data field from the title, when the title is edited, we should not change the data field and user will need to change it manually.
The text was updated successfully, but these errors were encountered: