LLMS_Admin_User_Custom_Fields::output_instructors_assistant_scripts()
Output JS to handle user interaction with the instructor’s parent field
Description Description
Display custom field ONLY when creating/editing an instructor’s assistant.
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.user.custom.fields.php
public function output_instructors_assistant_scripts() {
?>
<script>
( function( $ ) {
var $role = $( '#role' ),
$parent = $( '#llms-parent-instructors-table' );
$role.closest( '.form-table' ).after( $parent );
$role.on( 'change', function() {
if ( 'instructors_assistant' === $( this ).val() ) {
$parent.show();
} else {
$parent.hide();
}
} ).trigger( 'change' );
} )( jQuery );
</script>
<?php
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.13.0 | Introduced. |