Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Passing zero (0) to Form::input as a value produces form element with no value
  • I'm not sure if it was designed this way, but if I:

    <?= Form::hidden('category_id', 0); ?>

    I get this output:

    <input name="cateogry_id" type="hidden" id="form_cateogry_id" />

    I would expect the value attribute to be defined as 0. However, as you can see, the value attribute is omitted entirely.
  • Maybe try this :
    Form::hidden('category_id', '0');
  • HarroHarro
    Accepted Answer
    This has been fixed quite some time ago, so I guess you're using an outdated version?

Howdy, Stranger!

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

In this Discussion