Hi Przemyslaw,
Related to your queries you can do as follows,
1) Yes you can make a field non-editable depending on the documents phase through
Class IapiDocumentLockManager as below
IapiDocumentLockManager.lockField(IapiSessionContextIfc session, IBeanIfc bean, java.lang.String attributeId);
2) Through script you can set the values in the second extension field depending on the choice you made in the first extension.
Hope this helps!
Regards,
Raj