|
3 | 3 | namespace Tapp\FilamentFormBuilder\Filament\Resources;
|
4 | 4 |
|
5 | 5 | use Filament\Forms;
|
6 |
| -use Filament\Forms\Form; |
7 |
| -use Filament\Resources\Resource; |
8 | 6 | use Filament\Tables;
|
| 7 | +use Filament\Forms\Form; |
9 | 8 | use Filament\Tables\Table;
|
10 |
| -use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\Pages\CreateFilamentForm; |
| 9 | +use Filament\Resources\Resource; |
| 10 | +use Filament\Forms\Components\Toggle; |
| 11 | +use Tapp\FilamentFormBuilder\Models\FilamentForm; |
11 | 12 | use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\Pages\EditFilamentForm;
|
12 | 13 | use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\Pages\ListFilamentForms;
|
13 |
| -use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\RelationManagers\FilamentFormFieldsRelationManager; |
| 14 | +use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\Pages\CreateFilamentForm; |
14 | 15 | use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\RelationManagers\FilamentFormUsersRelationManager;
|
15 |
| -use Tapp\FilamentFormBuilder\Models\FilamentForm; |
| 16 | +use Tapp\FilamentFormBuilder\Filament\Resources\FilamentFormResource\RelationManagers\FilamentFormFieldsRelationManager; |
16 | 17 |
|
17 | 18 | class FilamentFormResource extends Resource
|
18 | 19 | {
|
@@ -52,6 +53,10 @@ public static function form(Form $form): Form
|
52 | 53 | Forms\Components\TextInput::make('name')
|
53 | 54 | ->required()
|
54 | 55 | ->maxLength(255),
|
| 56 | + Toggle::make('permit_guest_entries') |
| 57 | + ->hint('Permit non registered users to submit this form'), |
| 58 | + Forms\Components\TextInput::make('redirect_url') |
| 59 | + ->hint('(optional) complete this field to provide a custom redirect url on form completion. Use a fully qualified URL including "https://" to redirect to an external link, otherwise url will be relative to this sites domain'), |
55 | 60 | Forms\Components\Textarea::make('description')
|
56 | 61 | ->columnSpanFull(),
|
57 | 62 | ]);
|
|
0 commit comments