@@ -166,16 +166,6 @@ Input::make('name', 'Name')->lazy(), // bind on change
166166Input::make('name', 'Name')->debounce(500), // bind after 500ms delay
167167```
168168
169- ## Bootstrap Grid
170-
171- Many fields also allow you to specify a bootstrap column size for the input e.g.:
172-
173- ``` php
174- Input::make('name', 'Name')->col_size('col-md-9'), // Update the default column size
175- Input::make('name', 'Name')->col_sm(), // Update the default column size to small
176- Input::make('name', 'Name')->col_md(), // Update the default column size to medium
177- Input::make('name', 'Name')->col_lg(), // Update the default column size to large
178- ```
179169
180170## Sizing
181171
@@ -234,6 +224,26 @@ Arrayable::make('locations', 'Locations')->fields([
234224
235225Available methods: ` fields ` , ` help ` , ` disabled `
236226
227+
228+
229+ ### Bootstrap Grid
230+
231+ A bootstrap support to the form.
232+
233+ #### Row ` ($label = null) ` and RowColumn ` ($label = null) `
234+
235+ An array of fields display in a Bootstrap Row or Column
236+
237+ ``` php
238+ Row::make()->fields([
239+ Input::make('city')->placeholder('City'),
240+ Select::make('state')->placeholder('State')->options(['FL', 'TX']),
241+ ]),
242+ ```
243+
244+ Available methods: ` fields ` , ` help ` , ` disabled ` , ` isColumn ` , ` col_class `
245+
246+
237247### Button ` ($label = 'Submit', $style = 'primary') `
238248
239249A button used for actions and links.
@@ -404,29 +414,23 @@ class CreateClientForm extends FormComponent
404414 public function fields()
405415 {
406416 return [
407- Input::make('name', 'Name')
408- ->col_md()
409- ->placeholder('Full Name'),
410- Input::make('email', 'Email')
411- ->type('email')
412- ->placeholder('Email, example:
[email protected] ')
413- ->col_md(),
414- Select::make('gender', 'Gender')
415- ->placeholder('Gender')
416- ->options(['Male', 'Female'])
417- ->col_md()
418- ->addAttrs(['class' => 'd-block w-full']),
419- Input::make('phone_no', 'Contact Number')
420- ->placeholder('(xxx) xxx xxxxx')
421- ->col_md(),
422- Input::make('street_address', 'Street Address')
423- ->col_md(),
424- Input::make('city', 'City')
425- ->col_md(),
426- Input::make('state', 'State / Parist')
427- ->col_md(),
428- Input::make('country', 'Country')
429- ->col_md(),
417+ Row::make()->fields([
418+ Input::make('name', 'Name')
419+ ->placeholder('Full Name'),
420+ Input::make('email', 'Email')
421+ ->type('email')
422+ ->placeholder('Email, example:
[email protected] '),
423+ Select::make('gender', 'Gender')
424+ ->placeholder('Gender')
425+ ->options(['Male', 'Female'])
426+ ->addAttrs(['class' => 'd-block w-full']),
427+ Input::make('phone_no', 'Contact Number')
428+ ->placeholder('(xxx) xxx xxxxx'),
429+ Input::make('street_address', 'Street Address'),
430+ Input::make('city', 'City'),
431+ Input::make('state', 'State / Parist'),
432+ Input::make('country', 'Country'),
433+ ])
430434 ];
431435 }
432436
0 commit comments