javascript - what is the difference between 'value' => 'accept', and 'checked' => TRUE, when using function form_checkbox() -


i want set checkbox automatically unchecked when webpage loads. using function form_checkbox() has these parameters if use array give checkbox desired properties.

$data = array( 'name'        => 'newsletter', 'id'          => 'newsletter', 'value'       => 'accept', 'checked'     => true, 'style'       => 'margin:10px', );  echo form_checkbox($data); 

which parameter in array alter when page loads user checkbox unchecked , user have check checkbox checkbox become true?

try

set 'checked' => false, will generate checkbox unchecked

or can remove 'checked'=>, without attribute it's default unchecked


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -