Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][HTML] niekompletne wyświetlanie formularza
agata
post 23.07.2010, 16:54:50
Post #1





Grupa: Zarejestrowani
Postów: 53
Pomógł: 0
Dołączył: 4.12.2009

Ostrzeżenie: (0%)
-----


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.
Go to the top of the page
+Quote Post
bastard13
post 23.07.2010, 17:58:32
Post #2





Grupa: Zarejestrowani
Postów: 664
Pomógł: 169
Dołączył: 8.01.2010
Skąd: Kraków

Ostrzeżenie: (0%)
-----


brakuje ci kropki, powinno być tak:
  1. $this->response['content'] .= $this->load->view('test', $item, True);


--------------------
Go to the top of the page
+Quote Post
agata
post 23.07.2010, 18:02:34
Post #3





Grupa: Zarejestrowani
Postów: 53
Pomógł: 0
Dołączył: 4.12.2009

Ostrzeżenie: (0%)
-----


faktycznie smile.gif
dzięki
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 00:29