diff --git a/src/Form/LocationFormType.php b/src/Form/LocationFormType.php new file mode 100644 index 0000000..1b5da87 --- /dev/null +++ b/src/Form/LocationFormType.php @@ -0,0 +1,38 @@ +add('name') + ->add('address') + ->add('city') + ->add('state', EnumType::class, [ + 'class' => State::class + ]) + ->add('zip') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Location::class, + 'csrf_protection' => true, + 'csrf_field_name' => '_token', + 'csrf_token_id' => 'location', + ]); + } +}