what would be the best approach to create a 'read-only' schema field in Tridion 2011? There was a good extension for 5.3/2009 (http://www.sdltridionworld.com/community/extension_overview/readonlyfields.aspx), but how should we proceed with T2011?
1 Answer
A GUI Extension is good way to do this in Tridion 2011. There's a useful example here:
http://yoavniran.wordpress.com/2010/08/23/the-read-only-fields-tridion-gui-extension/
Update
As Nuno pointed out the example I provided is no use to you as its for Tridion 2009.
A GUI extension remains a valid approach, you just need a better example.
In the below Albert shows how to load some JavaScript for the Component Edit view.
Once you have your code executing in the Component Edit view you can mimic the approach in the 2009 example, marking schema fields with a [READONLY] suffix.
Then in your custom JS locate the fields that have a label element that contains [READONLY].
Once you have this, the input itself will be a child element, to which you can add the disabled attribute.
That covers standard text fields, you might have to think different for other field types - but again the 2009 example will guide you!
-
That's an example for Tridion 2009, OP specifically asked for 2011.– Nuno Linhares ♦Commented May 22, 2013 at 16:08