SharePoint 2010: How to use jQuery to update the TaxonomyFieldControl field values

  • To update the visual display of the taxonomy textbox
  1. target the .ms-taxonomy-writeableregion
  2. update  the html markup with specific format per item: “<span class=”valid-text” title=””>{0}</span>”, 0: name of the taxonomy term
  3. update the hidden value in the page, so it will save to the page field
  4. target the INPUT.ms-taxonomy class with specific format: “{0}|{1};” with the 0: name of the taxonomy term, 1: GUID of the taxonomy term.

Scenario:
This is useful when the user don’t want to struggle with the enterprise keywords intellisense since they don’t know about the structure of the term set, therefore we can make a custom tree view / check box list for the user to pick from and update the UI on the client side, to fill up the field when user pick an option.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s