A newer version of this content is available on ReWorkflow ReSource.
Address blocks default the Country field to "United States." What if you want to change this because your instution is located in some other country, or because only international students will be filling out a form?
You could set Country to blank:
// Wait for the page to finish loading $(function () { // Set the Country field to blank $("[data-export='sys:address'] [name$='_country']").val(''); });
You could pre-set Country to Canada:
// Wait for the page to finish loading $(function () { // Set the Country field to blank $("[data-export='sys:address'] [name$='_country']").val('CA'); // Trigger change handler to update the region list $("[data-export='sys:address'] [name$='_country']").change(); });
Tip: The list of country codes can be found in the HTML source of the form. It appears to follow the ISO 3166-1 alpha-2 list.