Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Form won't work when submit button is within "col-md-12"
  • I have encountered a weird bug.
    I am using 1.7.3 straight out of the box. 
    My CSS is bootstrap.css and when I use the class, "col-md-12" for the div element to enclose a submit button, my form won't accept any click or input. I tried it with IE and Chrome.

    I wrote my submit button like so

    <div class="col-md-12">
    <?php echo Form::submit('submit', 'Search', array('class' => 'btn btn-success')); ?>
    </div>

    All form starts working again as soon as I delete the class from the div.
    This is the weirdest thing I've seen so far.
  • HarroHarro
    Accepted Answer
    Since that is purely frontend, HTML and CSS, it can not be a Fuel issue? Form::submit() just generates some HTML, no rocket science at all.

    Bootstrap uses <button> tags, not <input> tags for buttons, so I suggest using Form::button() instead, and pass "type" => "submit" in the attribute array to indicate it's a submit button. Works fine here.
  • You are right. It is a bug on Bootstrap's part, I think. I'll ask on their forum.

Howdy, Stranger!

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

In this Discussion