Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Passing fieldset form through array to view
  • i have passed my generated form to to view by array, all tags are escaped, and didnt rendered in view, How can i stop escaping it. this is a special form, and i have to pass to view, not to template.
    in template i found an option like this
    $this->template->set( content , $form->build(), false);

    but i want to send it in this way,

    $data = array(
    'form' => $form->build();
    );

    $this->theme->get_template()->set('content', $this->theme->view('students/index',$data));
    forms are generating currectly, but at view, i echoed it, but all are escaped./
  • philipptempelphilipptempel
    Accepted Answer
    Since a template is nothing else than a view, the same syntax for not-escaping items in the view applies. Simply use

    $this->theme->get_template()->set(
    'content',
    $this->theme->view(
    'students/index',
    $data,
    false
    )
    );

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion