Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
//bp-xprofile/admin/js/admin.js
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.