9 months ago

Submitting the form to show old empty value in validation error

Posted 9 months ago by mstdmstd

Hello In my laravel 5.7/ blade app in my form I make next condition for value property of an text input :

value=" ( !empty(old('field_name')) ? old('field_name') : ( isset($dbRow) ?$dbRow->field_name : '') ) "

but it does not work as I expected : if having entered field value user clear this value and submit the form then oroginal value $dbRow->field_name is show, but not last entered empty value. I need in my blade some key that it is invalid form submittion? Has laravel any? Or some other decision ?


Please sign in or create an account to participate in this conversation.