If you want to control the mapping yourself, and avoid the editor, you just need to use p4 branch -i and pass the already-filled-in form yourself.
So, for example:
p4 branch -o name > branchData.txt to generate the branch form into a temporary file
- modify branchData.txt as you desire (e.g., to change the mappings to your desired set)
p4 branch -i < branchData.txt to load your branch data into the Perforce server and create the new branch spec in the server.
Of course, you don't really need to do step (1) if your program already knows how it wants to set up the branch spec data. Just put your desired branch spec data into a file and run p4 branch -i with stdin redirected to that file. Or, even, you can just feed your form data directly from your program into p4 branch -i since it's just reading from stdin.