1 year ago

Valid condition in blade form input

Posted 1 year ago by PetroGromovo

Hello, How to make valid condition for value tag in laravel 5.7 if field was modified and we have to show new value if field was modified ? I tried like that ( with required for this field) condition :

    (old('common_settings_site_name') ? old('common_settings_site_name') : ( isset($common_settings_site_name) ?$common_settings_site_name : '' ) ),

it is good, bur not in case when field with existing value was cleared, then original value(not old - clear) is shown.

Like text field had some text “Value” The field was cleared before submitting. submitting form text “Value” would be shown, not empty string as I exepcted ?

How to fix it ?


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