Set the State Field / Online Join iPart

The previous blog entry touched on setting the country code via the online join to a fixed value (examples provided for Canada and US).

Twitter user @thejamesjones responded to suggest doing the same thing to the state field for state-based organizations.

This assumes that your default country code (via the appropriate RiSE setup page) is US, if it's another country use the earlier script to set the country code first.

Add this to the bottom of the page (Content_HTML iPart)

	jQuery(document).ready(function() {
			jQuery("[id$='_SelectCountry'] option:not(:selected)").attr("disabled", true);
			jQuery("[id$='_SelectSubEntityCode'] option:not(:selected)").attr("disabled", true);
		}, 250);

The end result of this script should be a country code set to "United States", and a state code set to "Iowa", with neither field being updateable.

2459 Bridge Road
Oakville, ON
L6L 2G9
Office: (905) 901-3625
Mobile: (289) 795-3538