0
  1. Is it possible to implement tool tip (instruction) for SDL Tridion component fields using GUI extension? If so, could you please provide the details on how it can be done. The tool tip should appear right next to the field whenever the cursor is placed on the field.

  2. Based on the selected value in one field of SDL Tridion component, can the values in an other field be restricted to specific set of values? For example, country and city fields. When the country is selected, city field should only show the cities of the selected country.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

3 Answers3

3

A custom tool tip with instructions for a field

You may consider using custom URLs to accomplish the same functionality. You can provide a separate URL for every field, so you could easily have a "/Extensions/Instructions/Article_Body.html" for one field and ""/Extensions/Instructions/Article_NavTitle.html" for another. That way the user can click the field name to pop up your HTML files with instructions. Although the GUI is different from what you describe, it will require less custom coding.

If you're stuck on the GUI as described in the requirements, I suggest you start by writing your own GUI extension and show us how far you got.

A dependency between fields

As Jeremy said already this is not a default option in Tridion, but can be accomplished (like pretty much anything) in a GUI extension.

This type of requirement has been covered quite extensively already in these questions:

Community
  • 1
  • 1
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • For writing an GUI extension, as suggested what should be extended. Here we would require to capture an event at the field level it seems ? – bukubapi Jul 05 '12 at 11:44
  • Yes, that's what it sounds like. Given the requirement, you should probably listen to the onfocus event. Note that this is a standard HTML event, onfocus is not specific to Tridion. – Frank van Puffelen Jul 05 '12 at 11:51
  • But how would the event code be inserted into the HTML. When we open an component the HTML is created by the Anguilla JS ( Hope my observations is right ). – bukubapi Jul 05 '12 at 12:02
  • The snippets here may be a good starting point: http://code.google.com/p/tridion-practice/wiki/AnguillaSnippets#Get_the_FieldBuilder_in_the_Component_view If you get stuck somewhere, share your (relevant and minimal) code and tell us where you got stuck or which error message you get. – Frank van Puffelen Jul 05 '12 at 12:31
  • Thanks for the pointers Frank. But when the component edit view screen is loaded, we need a place where we can get the controls of the form, and then work with it. Need some help in identifying the function where this can be acheived. – bukubapi Jul 06 '12 at 09:05
  • That link should be enough to get you started. If you get stuck somewhere along the way, share the code **you** wrote and tell us what doesn't work. Don't just ask more open-ended questions. – Frank van Puffelen Jul 06 '12 at 11:30
2

Check out Can we show a different tooltip when a Dashboard Button is disabled? for the answer to question 1. The default option for question 2 is that it is not possible to do this. A GUI extension could be the answer though.

Community
  • 1
  • 1
Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20
1

Custom URL and Description

+1 to Frank on Custom URL. Organization-specific help pages definitely help authors. Though they may not use Custom URLs for this, see a great user guide example from Yale.

Don't forget the description field. This is the easiest way to give authors basic instruction for each field and it shows as a tool tip.

For the text within a field, you can also use default settings. If you're using the inline UI (formerly SiteEdit), consider Content (Component) Types to set default values and instructions.

Category & Keyword (as a tree) for Field Dependencies

Use Categories and Keywords displayed with the "tree" option by setting subcategories (such as country) to abstract keywords. Set selectable keywords (e.g. cities) to normal. Then select the tree option to make it easier to navigate between the options.

If the use case is actually countries and cities, consider offering a better interface than the tree selector or drop-downs.

The catch is only the normal keywords would be saved in the component. However, there are workarounds to getting the keyword path.

Update: Custom Urls are not deprecated, only the old script was deprecated in favor of a new approach in SDL Tridion 2011 SP1.

Community
  • 1
  • 1
Alvin Reyes
  • 2,889
  • 16
  • 38