LeanAdmin / feature-discussions

The place for discussing new features
6 stars 0 forks source link

Integration with tall-forms #4

Closed stancl closed 3 years ago

stancl commented 3 years ago

Find a way to integrate with tall-forms.

A potential solution would be to have a Field that can translate tall-forms' API for Lean.

It could be used like this:

use Lean\Fields\TallField;
use Tanthammar\TallForms\Input;

TallField::make('name')->field(Input::class, function (Input $input) {
    $input->some()->logic();
}):

It would store the tall-forms field in an internal property and it would translate its API like this:

public function getRules()
{
    return $this->field->tallFieldsMethodForRules();
}
stancl commented 3 years ago

I'll hold this off for now.