I'm in the process of creating my first custom property editor. I have 13 fields that I'm using to collect data and all of this is to be stored as JSON. The first four fields are saving just fine but I can't get the remainder of the fields to save data.
Have you checked the browsers console log to see if it provides some error information when you're loading and saving the document type where the property editor is being used?
I suspect this line (which is the fourth value) could perhaps be the reason
I have seen JavaScript be less than happy about dealing with stuff that contains "-" in the names. So perhaps try renaming to preTreatment by using camel casing as you're also doing in other name as well so it looks like
Custom property editor not saving all data
I'm in the process of creating my first custom property editor. I have 13 fields that I'm using to collect data and all of this is to be stored as JSON. The first four fields are saving just fine but I can't get the remainder of the fields to save data.
Here is my code:
Manifest -
View -
Controller -
I have been using the tutorial here http://umbraco.github.io/Belle/#/tutorials/manifest and referencing this post https://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/57750-Custom-property-editor-with-multiple-inputs
Can some one glance over this and see if there is something that I'm just missing.
Thanks for any help.
Owen
Hi Own
Have you checked the browsers console log to see if it provides some error information when you're loading and saving the document type where the property editor is being used?
I suspect this line (which is the fourth value) could perhaps be the reason
I have seen JavaScript be less than happy about dealing with stuff that contains "-" in the names. So perhaps try renaming to preTreatment by using camel casing as you're also doing in other name as well so it looks like
Does this change anything?
Remember to clear the browser cache after making the changes btw.
/Jan
Thank you so much. It's always the little things.
Hi Owen
Yeah and it's always so easy to overlook stuff like this so it's good to get another pair of eyes on it - Happy that it solved your issue :)
Happy coding!
/Jan
is working on a reply...