Created
March 10, 2014 23:52
-
-
Save paulgibbs/9476911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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