What's the real error message? Usually the error box has a "details" button.In my experience, the error you're getting is usually caused by custom Javascript that throws errors (e.g. syntax errors) before the onFormInit handler gets called. I suggest making sure your Javascript is valid.
...You get different errors depending...
- Here is your cardinal sin - an attempt to set DCR Item's true numeric value. That's what kills "Save".Convert it to the String. Like this:function setValue(name, value) { IWDatacapture.getItem(parent + name).setValue(value + '');}Other than that you have tons of problems with this code. Most obvious:- Unless specifically documented, you should never run anything directly from the Scriptlike you do for init_link_to(). It is way to early. You must create your own init function(s)and run them onFormInit Event. To register "onFormInit" you must use "addFormHandler".Both Manuals and Forum have samples- Your "addItemHandler" lines should be within the init() function.- You should never register same handlers over and over again like you (potentially) do withininit_link_to on replicant add- You should not register event Handlers for each replica, only one per Replicant Container/Itemand so on...
Question about your last recommendation about the Handlers for each replica...
I was talking about something like that: IWEventRegistry.addItemHandler(parent + "/whatever", "onItemChange", ...);called on every "Replicant Added" Event. Whatever "parent" Object here is, that's not how you do these things.For the "onItemChange" you do go down to the field level. Thing is, you set it only once ignoring replicas' ordinalnumbers. Note that FormAPI will automatically pass a reference of the Item Object that triggered the Change Eventto your Event Handler. You can manipulate it directly without ever knowing what nested Ordinal Numbers are there.If you need an access to the trigger's related Items you'd have to get trigger Item's XPath and go from there.Makes sense?