Good question! Have you been able to figure out a good solution? autoValue could be used for enforcing your constraint, but it would not translate into any autoform UI representation. But I think you can use the disabled attribute when displaying those form fields, something like:
I’m afraid I haven’t found a solution. What you suggest is what I ended up using: putting the disabled loginc into the template. This feels kind of unmeteoric and requires lots of hand labor, so currently I’m thinking about ditching autoform and figuring out a simpler form package on my own.
unfortunately, there really isn’t a good way to do this.
I think the best chance is to extend the options of denyUpdate or denyInsert to take a function as a parameter which returns a Boolean and submit a PR to collection2.