Form input set value and old values #2183
Answered
by
AlejandroAkbal
AlejandroAkbal
asked this question in
Q&A
-
I am making a creation and edit "Screen". public function layout(): iterable
{
return [
Layout::rows([
// I want to set its actual values here for example!
Input::make('maximum_posts_shown', __('Maximum Posts'))
->title(__('Maximum Posts'))
->type('number')
->max(30)
->min(1)
->required(),
Select::make('moderation_mode', __('Moderation Mode'))
->title(__('Moderation Mode'))
->options([
ContentModerationMode::Automatic->value => ContentModerationMode::Automatic->toLocalizedString(),
ContentModerationMode::Manual->value => ContentModerationMode::Manual->toLocalizedString(),
])
->required(),
Select::make('update_mode', __('Update Mode'))
->title(__('Update Mode'))
->options([
ContentUpdateMode::Automatic->value => ContentUpdateMode::Automatic->toLocalizedString(),
ContentUpdateMode::Manual->value => ContentUpdateMode::Manual->toLocalizedString(),
])
->required(),
]),
];
} |
Beta Was this translation helpful? Give feedback.
Answered by
AlejandroAkbal
Apr 2, 2022
Replies: 2 comments 1 reply
-
Could you help me, @tabuna? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Solved in #2191 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AlejandroAkbal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved in #2191 (comment)