thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Force Form field on a new line #5109

Closed hairmenu closed 3 years ago

hairmenu commented 4 years ago

Version information

Description of problem

As a desktop user, i need to more option to display edit/add forms.

Proposed solution

Having a 'newline:true' options in the display options. So i can have a form like this

"display": {
        "width": "4",
        "newLine": true
    }

[width:3 Form 1] [width:3 Form 2] --- empty space [width:3 Form 4] --- empty space [width:12 Form 5]

in the edit-add.blade.php something like (i m aware this is not production quality code but this is the idea)

 @if (property_exists($display_options, 'newLine'))
     <div class="col-md-12" class="noheight"></div>
 @endif

Alternatives considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

MrCrayon commented 3 years ago

I'd rather implement a way to assign custom classes, I actually already do it in my fork.

The current way a bit hacky is appending another class after the number, it works because Voyager does not validate that field since it comes from whoever set it in BREAD configuration.

"display": {
    "width": "4 clear-both"
}

It will make that field go on the next row

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.