質問 > フロント機能 > 受取時間を5時間以降あとに制限したい |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
hashida |
投稿日時: 2021/6/29 20:12
対応状況: 開発中
|
半人前 登録日: 2021/6/25 居住地: 投稿: 28 |
受取時間を5時間以降あとに制限したい ▼テンプレート
[EC-CUBE] EC-CUBEのバージョン4.0.5、新規インストールかアップデートか、等 [カスタマイズの有無] 商品の受け取り時間の項目を追加し、時間を5時間後以降 に制限をつけたいです。 symfonyのGreaterThanで実現できるかと思い試してみました。 以下のように記述しました。 $builder->add('takeout_time', DateTimeType::class, [ 'label' => '受け取り時間', 'required' => true, 'options' =>[ 'constraints' => [ new Assert\GreaterThan("+5 hours"), ], ], [現象] 以下のようなエラーが出てしまいました。 The option "options" does not exist. Defined options are: "action", "allow_extra_fields", "allow_file_upload", "attr", "auto_initialize", "block_name", "by_reference", "choice_translation_domain", "compound", "constraints", "csrf_field_name", "csrf_message", "csrf_protection", "csrf_token_id", "csrf_token_manager", "data", "data_class", "date_format", "date_widget", "days", "disabled", "eccube_form_options", "empty_data", "error_bubbling", "error_mapping", "extra_fields_message", "format", "help", "hours", "html5", "inherit_data", "input", "invalid_message", "invalid_message_parameters", "label", "label_attr", "label_format", "mapped", "method", "minutes", "model_timezone", "months", "placeholder", "post_max_size_message", "property_path", "required", "seconds", "time_widget", "translation_domain", "trim", "upload_max_size_message", "validation_groups", "view_timezone", "widget", "with_minutes", "with_seconds", "years". optionではなくactionであるという意味だと思われるのですが、builderにどう記述すればよいかわかりません。 ご教授いただけますと幸いです。 よろしくお願いいたします。 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
» 受取時間を5時間以降あとに制限したい | hashida | 2021/6/29 20:12 |
Re: 受取時間を5時間以降あとに制限したい | 468 | 2021/6/30 9:35 |
Re: 受取時間を5時間以降あとに制限したい | hashida | 2021/7/2 13:19 |