+ Start a Discussion
Ravi JakhotiyaRavi Jakhotiya 

How to put default value in Lightning output field in lwc

I want to show in <lightning output field> default values when there is no value in record field
Best Answer chosen by Ravi Jakhotiya
ravi soniravi soni
hy Ravi,
user  can't set default value in output field.
https://stackoverflow.com/questions/52704291/unable-to-set-value-dynamically-for-lightninginputfield
instead of output field you can use lightning:inut field disabled="true" and set value attribute it should be show like output field.

let me know if it helps you by marking it as best answer.
Thank you

All Answers

ravi soniravi soni
hy Ravi,
user  can't set default value in output field.
https://stackoverflow.com/questions/52704291/unable-to-set-value-dynamically-for-lightninginputfield
instead of output field you can use lightning:inut field disabled="true" and set value attribute it should be show like output field.

let me know if it helps you by marking it as best answer.
Thank you
This was selected as the best answer
Ravi JakhotiyaRavi Jakhotiya
Thanks Veer,
I have requirement like , have to overriide new button with a popup in related list which has parent object is Opportunity...
now there are 3 fields which have a data type is 'date'....so when there is date it should same and where is no date it shoud show '-' symbol....
This is mine problem
Please help me on this😊