Hi, I want to know how to assign javascript function to select input name.
I tried this way. It does'nt work. please help. It says echo function not allowed.
<?php
Select2::create(array(
__
"name"=> echo '<script type="text/javascript">
test();
</script>'; __
"defaultOption"=>array("--"=>""),
"dataStore"=>$this->dataStore("section1"),
"dataBind"=>array(
"text"=>"name",
"value"=>"id",
),
"attributes"=>array(
"class"=>"col-md-4 form-control"
),
));
?>