Swapping in inline form vs disabled/styled input
If I have a displayed element (lets say a name) that I want the user to be able to change, I see two options:
1) A display element (a div or something) and an inline form, with javascript showing one or the other based on clicking an edit button, cancelling the form, etc.
2) A input with classes/disabled that's swapped via interaction, so in one state it looks like an unstyled display element, and the other looks like an input.
Is there any downside to the latter? If the form/input are both submitted via fetch anyway, is there any problem with just having an unstyled input?
1) A display element (a div or something) and an inline form, with javascript showing one or the other based on clicking an edit button, cancelling the form, etc.
2) A input with classes/disabled that's swapped via interaction, so in one state it looks like an unstyled display element, and the other looks like an input.
Is there any downside to the latter? If the form/input are both submitted via fetch anyway, is there any problem with just having an unstyled input?
