i try to get the value from <input type="checkbox">
and pass it to my variable on controller but i always get 'Argument cannot be null'. i already try using inputHidden to <select>
tag and <input type="text">
and it works but why it didn't work on <input type="checkbox">
.
Did i do it correctly ? i do it based on Get text input value with the help of HTML and pass it to controller answer
--Visualforce--
<apex:inputHidden value="{!CC}" id="ccId"/>
<label><input type="checkbox" onchange="document.getElementById('{!$Component.ccId}').value = this.value;" />Kartu Kredit</label>
--Apex Class--
public Boolean CC{get;set;}
public PageReference Submit(){
web2lead.Credit_Card__c =CC;
update web2lead;
}