Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][HTML] niekompletne wyświetlanie formularza
Forum PHP.pl > Forum > Przedszkole
agata
Mam problem z wyświetleniem kompletnego formularza.
Przekazuje formularz z kontrolera do zmiennej i wyświetlam go w widoku ale nie ładuje się form_open();

kontroler:
  1. function get_strona_by_nazwa(){
  2. $query = $this->Edit_strony->get_strona();
  3.  
  4. if ($query->num_rows() > 0)
  5. {
  6. $this->response['content'] = form_open('site_edit').'<table cellspacing="3" cellpadding="3">';// - tej linijki nie wyświetla
  7.  
  8. foreach($query->result() as $item)
  9. {
  10.  
  11. $this->response['content'] = $this->load->view('test', $item, True); // zwraca input radio
  12. }
  13. $this->response['content'] .= '</table name="dada>'.form_submit('submit', 'edytuj').form_close();
  14.  
  15. }
  16. $this->load->view('index', $this->response);
  17. }


widok:
  1. <div id="body" style=" width: 100%; height: 400px; background-color: #fff;">
  2. <center name="jidaj"><?php
  3.  
  4. echo $content;
  5. ?></center>
  6. </div>

a tutaj źródło strony:
  1. <div id="body" style=" width: 100%; height: 400px; background-color: #fff;">
  2. <center name="jidaj"><tr><td>index</td><td> <input type="radio" name="nazwa" value="index" /></td></tr>
  3. </table name="dada"><input type="submit" name="submit" value="edytuj" /></form></center>
  4. </div>


co może być przyczyną, że nie wyświetla całego formularza?

atrybut name w table i center są dodane tylko po to żeby łatwiej było zlokalizować elementy w źródle strony.
bastard13
brakuje ci kropki, powinno być tak:
  1. $this->response['content'] .= $this->load->view('test', $item, True);
agata
faktycznie smile.gif
dzięki
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.