Do these properties you want to add need to persist after the document is saved and reopened?
Not necessarily (this is a pet project, and I haven't decided on all of the parameters on how I want it to work just yet), but depending on the circumstances, that might be a good thing if it is possible. If it's not possible, it wouldn't be a big deal to reset these properties when the document is reopened if that becomes necessary.
Once you get a field object into a variable using getField, you can add properties to it dynamically, but they will only survive as long as the variable that references the field object. So there's no need to use the prototype.
If you need it to persist, you can co-opt the little used "submitName" field property to store as much text as you need. You can use a delimiter character (e.g., | (pipe)) to separate values if you want multiple values, and later parse them out using the split string method. You will only run into a problem if the form is set up to submit using HTML format.
Actually, what I'm trying to do is replace my current 'SubmitName' workarounds with something more robust and user(me)-friendly.
So, if I create a variable, 'oField', and I give it it's own custom property (how to do this?), I can access that property whenever I want, as long as 'oField' is still in scope?
...But, that also means, that I would have to create a separate variable for each field which I need to store this info for? If I'm substituting one slightly complicated workaround for another, then I probably won't persue this any further. I wanted to make this as simple as possible, especially when rushed changes need to be made to the form. Creating variables each time a field is added/removed is just too much overhead for what I was envisioning. I was just certain that I had come across a way to do this long ago.
// Get a field object var oField = getField("text1"); // Add a custom property oField.bogus = "some value";
But yes, it will only be available as long as oField is. This is probably more complicated than using the submitName property.
Using the field prototype may have worked a while ago, but it doesn't appear as though you have access to it now.