Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Select a language from a list of languages in a drop-down box
<script type="text/javascript">
// Change the field name as needed. Remember to use the
// API name for custom fields!
//
var fieldName = 'language';
// Change thelanguage as needed.
//
var language = 'Spanish';
// No user-serviceable parts past here.
//
$(document).ready(function() {
var lang = $('*[name=' + fieldName + ']');
if (lang.length > 0) {
lang.val(language);
lang.parent().parent().hide();
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.