can be done, and the other formid is valid for 7 days
what most people do is to bury it on the page beforehand. Click events on the page try to pack a from to send fromId, to the backend to collect a large number of users' fromId stored in the database, and use that fromId to send it.
the user who receives the message is touser,. All you have to do is save the user's openid.
template message currently can only be triggered by the user when submitting the form or payment. You can get formid, when submitting the form. It is just a condition for submitting the template message, it is not the object you want to send.
I haven't seen the document or tested the validity of the formid mentioned by the two people upstairs.
however, if there is a validity period, you can send template messages to users more freely by saving formid.
Save the corresponding user openid when submitting, and then operate the backend to customize the message pushed by the template and specify the person to push.
if you want to send a template message, you must have a valid form_id,form_id with a validity period of 7 days. As long as it is the form_id generated by the form submission, you can send the template message to the user. If the demand for form_id is large, you can replace some links and picture clicks with form submission. In this way, each generated form_id is transmitted to the background and saved to the database, and the time is saved. Then write a method to clear out the invalid form_id periodically