Hello,
I would like to know how can I update a value that once checked can not be updated to uncheck anymore. What should be done, if there is the case I am missing something. Thank you in advance. Tia.
here is my standard implementation
CoralsForm::checkbox ('done', 'Resource::attributes.reader.done', $reader->done)
Hello,
You need to handle that in the Request file, because after 5.5 if the input field is empty its not passed to the middleware
for example in PostRequest you will find the below command
public function getValidatorInstance()
{
$data = $this->all();
if (isset($data['slug'])) {
$data['slug'] = str_slug($data['slug']);
}
$data['published'] = array_get($data, 'published', false);
$data['private'] = array_get($data, 'private', false);
$data['internal'] = array_get($data, 'internal', false);
$this->getInputSource()->replace($data);
return parent::getValidatorInstance();
}
It figures now, nice code, I will give it try, and thank you very much! 😀
Its working now, thumbs up! thank you!
🙂
Please login or Register to submit your answer