I'm building my first extension, and have created the sample quickform using civix generate:form. So far, so good, the form shows and works within a modal popup.
I've noticed with Core forms (like Contribution edit/view), I can send in an "action" query param, and based on the value of that, the form will either just display a view of the data for that ID, or will show the actual form to edit the data and save it.
I was wondering how I could do that in my custom extension. Do I need to create two sets of php/tpl files, one for editing and one for viewing? Or is there some method or something that will convert the form template to just a view of the fields for me?
If there is a simple example of this type of form (maybe an example extension I could look at), I would appreciate a pointer to it.