9

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?

6

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.

http://albertromkes.com/2012/01/30/tridion-gui-extensions-how-to-load-a-javascript-without-showing-a-gui-element/

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 May 22 '13 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.