buttflattery / yii2-formwizard

A Yii2 plugin used for creating stepped form or form wizard using yii\widgets\ActiveForm and \yii\db\ActiveRecord
https://yii2plugins.omaraslam.com/formwizard
Other
96 stars 13 forks source link

Form layout #49

Closed ritacionfoli closed 4 years ago

ritacionfoli commented 4 years ago

Hi, after updating I noticed that there's a bug in the output of the form. Below is a screenshot of the problem. bug

buttflattery commented 4 years ago

@ritacionfoli i dont think it has to do anything with the recent updates this looks more like a css problem as the first input Uomo in NOW and BEFORE are same but not the next 2, i have updated the extension on the demo site too and i dont find any odd behavior with the css see the customized input demo here https://yii2plugins.omaraslam.com/formwizard/customize-fields , you can see the custom css for the inputs that i want is properly applied and doe not shrink any inputs.

You might have to inspect the css via dev bar inspector and see what extra classes are there which are causing them to dismantle the layout. If you have any live url to the application i can look into it.

ritacionfoli commented 4 years ago

I think it depends on the loaded assets. When I load the page with the widget, the layout of the whole site is changed, in the other pages it is not. I send you the screenshots to try to make me understand. right_layout layout

buttflattery commented 4 years ago

okay, can you tell me what particular theme are you using so i can check it on my end and what classes are used on the links that are incorrectly placed when you include the widget.

I will reply back after i check and find the issue @ritacionfoli

ritacionfoli commented 4 years ago

It's a problem that come from bootstrap version. I'm using bootstrap3, but the widget loads assets for the version 4

buttflattery commented 4 years ago

if you look into setDefaults() method it will always look for yiisoft/yii2-bootstrap4 extension first and if not found it falls back to 3 , so if it is loading the bs4 assets and you are using yiisoft/yii2-bootstrap then it means you have installed both of those versions you need to remove the yiisoft/yii2-bootstrap4 from the composer.json of your project as it does not make sense to install both of them if you are using only one version @ritacionfoli

The widget wont install any of these extensions and depends on the project composer.json. Can you share you composer.json file here so i can confirm?

ritacionfoli commented 4 years ago

composer.json.txt

buttflattery commented 4 years ago

You are using the user module yii2-pluto which requires bootstrap4 see here https://github.com/sjaakp/yii2-pluto/blob/master/composer.json due to which you have the bootstrap4 extension installed you might need to look into its docs to use BS3 or you may have to switch to some other better rated module. @ritacionfoli

ritacionfoli commented 4 years ago

I've seen it. Thank you

buttflattery commented 4 years ago

As there are few other similar queries that are having the same situation and want to force the bootstrap version for the widget, so i am reopening this issue and would be adding the option in the new release.

buttflattery commented 4 years ago

@ritacionfoli i just released a new version with a new feature and some enhancements, one of which include forcing bootstrap version with option simple as "forceBsVersion"=>FormWizard::BS_3 . run composer update to update to the latest version 1.6.4. see details here

ritacionfoli commented 4 years ago

@buttflattery many thanx!!!