function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SalesforceLearnerNewbieSalesforceLearnerNewbie 

save the information checked by using slds checkbox

Hi,

 

I try to save the information into "task" based on the checked box by the user but it wont work. The information is not stored. 

VF page:

<apex:pageBlockTable value="{!sentence}" var="var">
                                        <apex:column headerValue="Task">
                                            <apex:repeat value="{!IF((todo_index < listtodocombined.size), listtodocombined[todo_index], false)}" var="td" id="tt">
                                                <div class="slds-checkbox">
                                                    <input type="checkbox" name="default" id="checkbox-27" onchange="taskInsert()" value="{!subj}" />
                                                    <label class="slds-checkbox__label" for="checkbox-27">
                                                      <span class="slds-checkbox_faux"></span>
                                                      <span class="slds-form-element__label"><apex:commandLink action="{!showPopup}" value="{!td}"></apex:commandLink></span>
                                                      <apex:actionSupport event="onchange" action="{!taskInsert}" reRender="todotesting" />
                                                    </label>
                                                  </div>
                                            </apex:repeat>
                                        </apex:column>&nbsp;
                                    </apex:pageBlockTable>&nbsp;



Controller(Apex):

 public PageReference taskInsert() {
            
      /*  Task t = new Task();
    t.FileType__c = selectedFileType;
    t.Task_Comment__c = comment;
    
    insert t;*/
    
     
        
        String userId = UserInfo.getUserId();
            
        
         
        Task t = new Task();
        t.OwnerId = userId;
        t.Subject = subj;
        t.Status = 'Open';
        t.Priority = 'Normal';
        for (String text_add: textt){
            t.Description = text_add;
        }
        insert t;