I am attempting to create a method that I can reuse over and over again for displaying data… then giving the user the ability to Edit that data, then go back to just displaying it only.
I will use an address for example.
I want to display the address first… in just one field formatted how I like… no problem.
I want an “Edit” button that replaces the single field with separate text boxes for the appropriate data (Name, Address1-3, City, State, etc)
Once the user has made their changes I want to click “Save” or “Update” etc. to get them back to the “Display only” version.
Im just asking for advice on how the best way to do this is for the end user?
If I display the address in text boxes, but remove the ability for them to edit the boxes then the address is very large and takes up a lot of space when its not needed.
Can I toggle a field from hidden back and forth via javascript somehow? So I would hide the “Nicely formatted” field of the address and then show the text boxes when they click an “Edit” button?
Thanks for any advice you can offer.