You can set up an inquiry form on the website created by Giblog
Giblog is a static CMS generation tool, but you can set up a contact form.
The contact form is not included in the Giblog itself.
As a static CMS tool, Giblog is preparing a mechanism to embed CGI forms in the Giblog website.
For the actual CGI form configuration, see the following two files in the repository on the official Giblog site.
Giblog official website inquiry form
templates / mail.html template / static / mail.cgi
You can copy the Giblog website as it is with "git clone", but if you want to save only the inquiry form, save it with the permission of the CGI program of 755 and the line feed code of LF.
Mechanism for embedding an inquiry form on a website
Giblog realizes the CGI inquiry form that can be embedded in the website by the following method.
The contact form is a simple HTML template
The contact form is a simple HTML file.
templates / mail.html
The mail form is described using the HTML form tag.
It is wrapped with the same structure as normal content such as header and footer.
CGI program to send emails
template / static / mail.cgi
Is a CGI program that sends emails.
Call CGI with Ajax communication
JavaScript is described in "mail.html", and "mail.cgi" is called by Ajax communication.
In this way, we have realized how to embed the contact form in the website.
Can I create a form created with CGI other than the inquiry form?
Yes. Everything you can do with a CGI program, such as a board for exchanging messages and a survey form, is feasible.
What kind of environment does it work in?
We are assuming a rental server that supports CGI.
What will happen to the security if I install the CGI form?
The security of installing a CGI form depends on whether the CGI is vulnerable.
If security is a priority over the contact form being integrated with the site, make the site completely static and google forms.
Can I use an existing CGI program?
It seems that almost all existing CGI programs are configured so that HTML forms are written inside the CGI program.
So unfortunately it will be difficult to reuse.
If the HTML form and the CGI program are separated and the Ajax communication is performed in the CGI program, I think it is easy to reuse.