sleeping-owl / admin

Administrative interface builder for Laravel
http://sleeping-owl.github.io/
MIT License
504 stars 258 forks source link

Displaying required field in create/edit forms #202

Open ockam opened 9 years ago

ockam commented 9 years ago

Is there a way to know (and therefore modify the display) if a field is required when rendering create/edit forms?

Would be nice to have a class on the form-group that reflect required validation (ex.: valid-required).

The HTML5 required attribute could also be added.

iliavlad commented 9 years ago

Attributes can be added to form elements

Admin::model(Foo\Bar::class)->form(function ()
{
FormItem::text('name', 'Name')->required()->attributes(['required', 'my-attribute' => 1]);
}
oldskool73 commented 9 years ago

Not in V3 they can't :(

ghost commented 9 years ago

Hi @ockam,

noxify and I have made a fork of soa, which we integrate this feature.

Addtional we changed the login method to Sentinel. Upcoming features are:

See at https://github.com/Pseudoagentur/soa-sentinel.

Master Branch is currently stable and is nearly at the original soa.