One rough way of making a "form" for a program is to use macros. This is not an explicit dialog form, with textboxes, but it allows you to control a program from a single .do file.
Basically, use a bunch of global macros in a separate do file, then have the macros peppered throughout the .do files. My example below does this
Macros File (Form do-file)
global projectname stackoverflow
global exportfmt putdocx
global analysisfolder "/file/path"
global dofilesfolder "/file/path"
The macro projectname
allows you to name the project, and thus I put it in all the file save commands, or I save
a cleaned dataset using that name. You can even put it inside a file path.
The macro exportfmt
you typically use when generating reports using the putdocx
or putpdf
command. Having a global variable allows me to switch between exporting a pdf or docx.
The macros analysisfolder
and dofilesfolder
you then use to create file paths that you can call for different projects, just by filling out the "form".
Do-files Usage
$exportfmt clear
$analysisfolder
use $project, clear
$exportfmt begin
$exportfmt paragraph
Thus, create a separate do-file (form do-file) with all your macros, and then you can change them all in one place as you see fit.
It's not a true form, but it can simplify changing of many things throughout a Stata program.