import {ShowHide} from 'ChillMainAssets/lib/show_hide/show_hide.js'; window.addEventListener('DOMContentLoaded', function() { let thirdpartyContainer = document.querySelector('#thirdparty-entity'), entitySelector = document.querySelector('#entity-selector') ; if (null === entitySelector) { return; } new ShowHide({ debug: true, load_event: null, froms: [entitySelector], container: [thirdpartyContainer], test: function(froms, event) { for (let container of froms) { return container.querySelector('input[value="thirdparty"]').checked; } console.log('we couldnt find the input'); return false; }, }) });