File tree Expand file tree Collapse file tree
wcfsetup/install/files/lib/acp/form Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77use wcf \data \contact \option \ContactOptionList ;
88use wcf \system \form \builder \field \BooleanFormField ;
99use wcf \system \form \builder \field \MultilineTextFormField ;
10+ use wcf \system \form \builder \field \SelectFormField ;
1011use wcf \system \form \builder \field \ShowOrderFormField ;
1112use wcf \system \form \builder \field \TextFormField ;
13+ use wcf \system \form \option \FormOptionHandler ;
1214
1315/**
1416 * Shows the contact option add form.
@@ -69,6 +71,24 @@ protected function createForm()
6971 ]);
7072 }
7173
74+ #[\Override]
75+ protected function getOptionTypeFormField (): SelectFormField
76+ {
77+ $ formField = parent ::getOptionTypeFormField ();
78+
79+ // Remove the WYSIWYG type because the contact form does not support
80+ // embedded objects due to the unique behavior of it.
81+ $ formField ->options (
82+ \array_filter (
83+ FormOptionHandler::getInstance ()->getSortedOptionTypes (),
84+ static fn ($ id ) => $ id !== "wysiwyg " ,
85+ \ARRAY_FILTER_USE_KEY ,
86+ ),
87+ );
88+
89+ return $ formField ;
90+ }
91+
7292 /**
7393 * @return array<int, string>
7494 */
You can’t perform that action at this time.
0 commit comments