original_string: public function datalist($entries = [])
      {
          $this->defaultAttribute('list', "list-{$this->id}");
  
          $datalist = "<datalist id=\"list-{$this->id}\">";
          foreach ($entries as $k => $v) {
              $datalist .= "<option value=\"{$k}\">{$v}</option>";
          }
          $datalist .= '</datalist>';
  
          return $this->append($datalist);
      }
code: public function datalist($entries = [])
      {
          $this->defaultAttribute('list', "list-{$this->id}");
  
          $datalist = "<datalist id=\"list-{$this->id}\">";
          foreach ($entries as $k => $v) {
              $datalist .= "<option value=\"{$k}\">{$v}</option>";
          }
          $datalist .= '</datalist>';
  
          return $this->append($datalist);
      }
code_tokens: public function datalist ( $ entries = [ ] ) { $ this -> defaultAttribute ( 'list' , "list-{$this->id}" ) ; $ datalist = "<datalist id=\"list-{$this->id}\">" ; foreach ( $ entries as $ k => $ v ) { $ datalist .= "<option value=\"{$k}\">{$v}</option>" ; } $ datalist .= '</datalist>' ; return $ this -> append ( $ datalist ) ; }
docstring: Add datalist element to Text input.
  
  @param array $entries
  
  @return $this
docstring_tokens: Add datalist element to Text input .