Welcome Guest, Not a member yet? Register   Sign In
FCKeditor and form helper
#1

[eluser]tfncruz[/eluser]
Hi,
I'm creating a form inside the controller. In that same form I'm using fckeditor for textareas. A strange thing happens when I load e page. The fckeditor appears before the entire form... not inside. Anyone know why's this happening?

here's the function that returns the form:
Code:
private function getAdicionarAutorForm() {
        $attributes = array('id' => 'adicionarAutorForm');
        $hidden = array('fotoDimensoes');
        
        $form = form_fieldset(' Adicionar Autor ');

        $form .= form_open_multipart('admin_addAutor/add', $attributes, $hidden);    
        $form .= "<ul>";
        
        $form .= "<li>";
        $form .= form_label('nome');
        $form .= form_input('nome', $this->validation->nome);
        $form .= $this->validation->nome_error;
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('data de nascimento');
        $form .= form_input('dataNascimento', $this->validation->dataNascimento);
        $form .= $this->validation->dataNascimento_error;
        $form .= "(aaaa-mm-dd)";
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('local de nascimento');
        $form .= form_input('localNascimento', $this->validation->localNascimento);
        $form .= $this->validation->localNascimento_error;
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('residĂȘncia');
        $form .= form_input('residencia', $this->validation->residencia);
        $form .= $this->validation->residencia_error;
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('excerto');
// FCKeditor
        $this->fckeditor->BasePath = base_url().'assets/js/FCKeditor/';
        $this->fckeditor->Config["CustomConfigurationsPath"] = base_url().'assets/js/fck_plpConf.js';
        $this->fckeditor->ToolbarSet = 'PLP';
        $form .= $this->fckeditor->Create();
        $form .= "</li>";
        
        $form .= "<li>";
        $form .= form_label('sobre o autor');
        $form .= form_textarea('sobreAutor', $this->validation->sobreAutor);
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('imagem');
        $form .= form_upload('fotoURL', $this->validation->fotoURL);    
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_label('titulo da imagem');
        $form .= form_input('fotoTitulo', $this->validation->fotoTitulo);
        $form .= "</li>";

        $form .= "<li>";
        $form .= form_submit('submit', 'adicionar autor');
        $form .= "</li></ul>";
        $form .= form_close();
        $form .= form_fieldset_close();

        return $form;
    }

Thanks!


Messages In This Thread
FCKeditor and form helper - by El Forum - 09-23-2008, 04:52 AM
FCKeditor and form helper - by El Forum - 09-23-2008, 05:14 AM
FCKeditor and form helper - by El Forum - 09-23-2008, 05:16 AM
FCKeditor and form helper - by El Forum - 09-23-2008, 05:20 AM
FCKeditor and form helper - by El Forum - 09-23-2008, 09:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB