Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function hide( id ) {
if ( !document.getElementById( id ) ) return false;
document.getElementById( id ).style.display = "none";
// the field id is [fieldtype]option[iterator] and not [fieldtype]div[iterator]
field_id = id.replace( 'div', 'option' );
document.getElementById( field_id ).value = '';
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.