@include('laravel-crm::partials.form.text',[
'name' => 'fieldName',
'label' => ucfirst(trans('laravel-crm::lang.name')),
'attributes' => [
'wire:model' => 'fieldName'
],
'required' => 'true'
])
@include('laravel-crm::partials.form.select',[
'name' => 'fieldType',
'label' => ucfirst(trans('laravel-crm::lang.type')),
'options' => [
'text' => 'Single-line text',
'textarea' => 'Multi-line text',
'checkbox' => 'Single checkbox',
'checkbox_multiple' => 'Multiple checkbox',
'select' => 'Dropdown select',
'radio' => 'Radio select',
'date' => 'Date picker',
],
'attributes' => [
'wire:model' => 'fieldType'
],
'required' => 'true'
])
@switch($fieldType)
@case('select')
@case('checkbox_multiple')
@case('radio')
| Label |
Order |
|
@foreach($fieldOptions as $key => $option)
|
@include('laravel-crm::partials.form.text',[
'name' => 'options['.$key.'][label]',
'type' => 'text',
'attributes' => [
'wire:model' => 'fieldOptions.'.$key.'.label',
]
])
|
@include('laravel-crm::partials.form.text',[
'name' => 'options['.$key.'][order]',
'type' => 'number',
'attributes' => [
'wire:model' => 'fieldOptions.'.$key.'.order',
]
])
|
|
@endforeach
|
{{--
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere--}}
@break
@endswitch
@include('laravel-crm::partials.form.select',[
'name' => 'fieldGroup',
'label' => ucfirst(trans('laravel-crm::lang.group')),
'options' => [''=>''] + \VentureDrake\LaravelCrm\Models\FieldGroup::pluck('name','id')->toArray(),
'attributes' => [
'wire:model' => 'fieldGroup'
],
])
@include('laravel-crm::partials.form.text',[
'name' => 'fieldDefault',
'label' => ucfirst(trans('laravel-crm::lang.default')),
'attributes' => [
'wire:model' => 'fieldDefault'
],
])
required == 1) ? 'checked' : null }} data-toggle="toggle" data-size="sm" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger">