Taking String Input from NodeMCU Webpage and Printing it on Serial Monitor
Try this. It uses the webserver library. I thought it was cleaner code. I also have a nicer way to include the pure html code.

For your original form go to yourIPaddress/single

#include &lt;ESP8266WiFi.h&gt;
#include &lt;ESP8266WebServer.h&gt;

const char* ssid = "MTS61752";
const char* password = "6900979039";

ESP8266WebServer webserver(80);

//------------------------------------------------
static const char PROGMEM singleLine[] = R"rawliteral(  
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Single Line Input&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form method="post" action="/save" &gt;
&lt;label for='name'&gt;Serial Printer (Put Text here: ): &lt;/label&gt;
&lt;br&gt;&lt;br&gt;
&lt;input type='text' id='name' name='name' required minlength='0' maxlength='800' size='100'&gt;
&lt;input type="submit" name="clk_action" value="accept"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
)rawliteral";

//------------------------------------------------
static const char PROGMEM INDEX_HTML[] = R"rawliteral(  
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Clock Settings&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form method="post" action="/save" &gt;
Turn on time:&lt;br&gt;&lt;input name="onTime" type="text" size="16" value="" &gt;&lt;br&gt;&lt;br&gt;
Turn off time:&lt;br&gt;&lt;input name="offTime" type="text" size="16" value="" &gt;&lt;br&gt;&lt;br&gt; 
&lt;input type="submit" name="clk_action" value="accept"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
)rawliteral";

//------------------------------------------------
void handleRoot() {
  webserver.send(200, "text/html", INDEX_HTML);
}

//------------------------------------------------
void handleNotFound() {
  webserver.send(404, "text/plain", "Page not found ...");
}

//------------------------------------------------
void handleSave() {
  String str = "Settings Saved ...\r\n";

  Serial.print("number of arguments "); 
  Serial.println(webserver.args());                    // number of arguments

  if (webserver.args() &gt; 0 ) {
    for ( uint8_t i = 0; i &lt; webserver.args(); i++ ) {
      str += webserver.argName(i) + " = " + webserver.arg(i) + "\r\n";

      Serial.println("Arg "+ String(i)+"="+ webserver.argName(i));     
      Serial.println("Arg "+ String(i)+"="+ webserver.arg(i));
    }
  }
  webserver.send(200, "text/plain", str.c_str());
}

//------------------------------------------------
void handleSingleLine() {
  webserver.send(200, "text/html", singleLine);
}

//------------------------------------------------
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  Serial.println("");

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());


  webserver.on("/", handleRoot);
  webserver.on("/save", handleSave);
  webserver.onNotFound(handleNotFound);
  webserver.on("/single", handleSingleLine);

  webserver.begin();
  Serial.println("Web server has started");
}

//------------------------------------------------
void loop() {
  webserver.handleClient();

}