cakephp-plugin-boost_cake icon indicating copy to clipboard operation
cakephp-plugin-boost_cake copied to clipboard

Alignment/positioning issues with file inputs...

Open designvoid opened this issue 11 years ago • 4 comments

The layout and spacing seems to be off for form inputs

This is the cake code:

<?php 
echo $this->Form->create('NewsPost', array(
    'type' => 'file', 
    'inputDefaults' => array(
        'div' => 'form-group', 
        'label' => array(
            'class' => 'col col-md-2 control-label'
        ), 
        'wrapInput' => 'col col-md-10', 
        'class' => 'form-control'
    ), 
    'class' => 'well form-horizontal'
));
?>
<?php 
echo $this->Form->input('NewsImage.0.image', array(
    'type' => 'file'
));
?>

And the resulting markup:

<div class="form-group">
    <label for="NewsImage0Image" class="col col-md-2 control-label">Image</label>
    <div class="col col-md-10">
        <input type="file" name="data[NewsImage][0][image]"  class="form-control" id="NewsImage0Image"/>
    </div>
</div>

untitled

designvoid avatar Sep 04 '13 09:09 designvoid

Do you expect what output HTML? I think it's a matter of CSS.

boostcake_-_bootstrap3_examples (by Chrome)

slywalker avatar Sep 05 '13 03:09 slywalker

I was using firefox - so is it a problem with firefox button rendering?

designvoid avatar Sep 05 '13 15:09 designvoid

Yes i think, I try and use firefox and the rendering output same with you ? I suggest to use jasny bootstrap file upload component, working well in firefox and chrome but is based bootstrap 2 http://jasny.github.io/bootstrap/javascript.html#fileupload

To slywalker , can create helper for jasny file upload component, Hheee *ups sorry :D

muhammadcahya avatar Sep 11 '13 09:09 muhammadcahya

I'm using what these. Demo for Bootstrap File Input styler

slywalker avatar Sep 19 '13 01:09 slywalker