Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fieldset textarea?
  • Hii there,

    I'm trying to create a form for a contact form.
    Currently, my code looks as follows:

    ```
    $fieldset = Fieldset::forge();
    $form = $fieldset->form();
    $form->add('name','',array("placeholder" => "Your Name", "class" => "form-control"));
    $form->add('email','',array("placeholder" => "Your Email", "class" => "form-control"));
    $form->add('subject','',array("placeholder" => "Subject", "class" => "form-control"));
    ```

    Now, I want to add a new textarea.
    However, I can only find docs on the `Form` class to do this, not for the `Fieldset` class.
    Anybody who knows how to do this?
  • HarroHarro
    Accepted Answer
    Add 

    'type' => 'textarea'

    to the array.
  • Thanks, worked like a charm :) 

Howdy, Stranger!

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

In this Discussion