Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
raw html as fieldset row
  • hi, can i add a custom html as a field row and  without label,example : 

    $fieldset->add('field_name',NULL,"<div id="wide_calendar">....</div>");
  • Have you tried it?
  • yes , it throw the error exception : Argument 3 passed to Fuel\Core\Fieldset::add()  must be of the type array, so is there any tip to do that? :D
  • HarroHarro
    Accepted Answer
    No, the answer is: "No, you can not".

    If you want to generate more complex forms, but still retain the functionality of the fieldset, you can do so:

    echo Form::open();
    echo $fieldset->field('fieldA')->build();
    echo '<div>'.Form::input('fieldB', 'name', 'value').'</div>';
    echo $fieldset->field('fieldC')->build();
    echo Form::close();

    Providing 'fieldB' is part of your fieldset, the other functionality, such as validation, will still work.

    If needed you can completely strip the fieldset form layout definition (in your config/form.php file) and provide all layout yourself in the view, or use $fieldset->set_config() to update specific parts from it at runtime.

  • this is what i need, thank you very much.

Howdy, Stranger!

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

In this Discussion