Closed tobystokes closed 6 years ago
Your last error is normal as there is no such thing as a readonly type field, it should be text
or number
with the readonly: true
option :
markerid:
label: Marker ID
type: text
readonly: true
x:
type: text
readonly: true
y:
type: text
readonly: true
My bad, I will make this clearer in the docs.
I cannot reproduce the issue unfortunately. Could you replace your fields with the above in your blueprint, and see if the "Marker ID" field is pre-filled on the modal opening ?
Many thanks for your help debugging this. :)
Ah sorry I should probably have reread the blueprint docs!
As for the not saving issue - even with your default .yml it was still occurring until I upgraded Kirby from 2.5.7 -> 2.5.8 and that seems to have done the trick. I can't see any relevant fixes in https://getkirby.com/changelog/kirby-2-5-8 but there you go...
Great that you got it working !
I didn't use them before so I wasn't aware that the custom modal events were just introduced in 2.5.8, so indeed there's no backward compatibility. Thanks for your help narrowing it down, I'll mention this in the readme.
This one's a bit more serious though :(
Currently, if i create a new spot, the markerid number is not being saved. there's no javascript error - i can see the an ID being generated. Not quite sure how/whether it relates to the entry-id?
If I change the markerid type to number, I can assign a unique number, which is a workaround. If I change the type to readonly, instead of hidden, I get the message 'The readonly field is missing. Please add it to your installed fields or remove it from your blueprint'