I need to remove a field in my editor form if a specific value is input
I need to remove a field in my editor form if a specific value is input
One of my fields is a drop down menu, and if a specific value is chosen for that, i need to be able to remove the option to edit another field
$( 'input', editor.get('license_type') ).on( 'change', function () {
console.log('hi');
if ( editor.get( 'license_type' ) === 'Evaluation - Mobile Device Push') {
console.log('hi');
editor.hide( 'expiration_date' );
editor.set('expiration_date', expireTime);
}
else {
editor.show( 'expiration_date' );
}
} );
I've tried this but it does nothing
This discussion has been closed.
Answers
That looks almost correct to me, but I suspect you want to use a
select
element, rather than aninput
(based on your comment about it being a drop down) do you not? Just the jQuery selector needs to be changed if so.Allan