The initFormValues function in the pat/internal/forms/forms.go file initialises a number of form values which are 'blanking' out values when the html form is submitted back to the Pat interface. This results in some forms being sent with blank fields.
As an example the Winlink Check-in form has the Message To field and the Form 1b. To: field blanked out when the Form is submitted back to the Pat "New Message...' window.
Note this is one example, there are other forms affected.
The code in the initFormValues function is shown below (line 990 Pat v0.15.1):
// some defaults that we can't set yet. Winlink doesn't seem to care about these
// b.FormValues["msgto"] = ""
// b.FormValues["msgcc"] = ""
// b.FormValues["msgsubject"] = ""
Note, I have commented these out and recompiled Pat and confirmed that all works as it should when these are not reinitialised.
I would suggest that the values should either not be initialised as they are, or a test is carried out to check if they contain data before initialising them.
I'm not sure why they are needed and my go coding knowledge is limited so I've not posted a patch. I only checked a few forms, some other variables being initialised may affect other forms?
Example form showing the problem fields (note these are showing after the code correction above) - without the change they are blank:

The
initFormValuesfunction in thepat/internal/forms/forms.gofile initialises a number of form values which are 'blanking' out values when the html form is submitted back to the Pat interface. This results in some forms being sent with blank fields.As an example the
Winlink Check-inform has the MessageTofield and the Form1b. To:field blanked out when the Form is submitted back to the Pat "New Message...' window.Note this is one example, there are other forms affected.
The code in the
initFormValuesfunction is shown below (line 990 Pat v0.15.1):// some defaults that we can't set yet. Winlink doesn't seem to care about these// b.FormValues["msgto"] = ""// b.FormValues["msgcc"] = ""// b.FormValues["msgsubject"] = ""Note, I have commented these out and recompiled Pat and confirmed that all works as it should when these are not reinitialised.
I would suggest that the values should either not be initialised as they are, or a test is carried out to check if they contain data before initialising them.
I'm not sure why they are needed and my
gocoding knowledge is limited so I've not posted a patch. I only checked a few forms, some other variables being initialised may affect other forms?Example form showing the problem fields (note these are showing after the code correction above) - without the change they are blank:
