Esp8266 Wifi Manager and a input field

Hi Team

I’m using this library on

And I am using the below code to set up the wifi manager.

What I want to know is, is there a simple way to add an input field on the Auto Connect Wif web page that allows me to change a number to a constant. And how Would change the below wifi code.

Thanks for you help.

const int channel = 1;
#include <ESP8266WiFi.h>          //

//needed for library
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <WiFiManager.h>          //

// select which pin will trigger the configuration portal when set to LOW
// ESP-01 users please note: the only pins available (0 and 2), are shared 
// with the bootloader, so always set them HIGH at power-up
#define TRIGGER_PIN 0

void setup() {
  // put your setup code here, to run once:
  Serial.println("\n Starting");


void loop() {
  // is configuration portal requested?
  if ( digitalRead(TRIGGER_PIN) == LOW ) {
    //Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wifiManager;

    //reset settings - for testing

    //sets timeout until configuration portal gets turned off
    //useful to make it all retry or go to sleep
    //in seconds

    //it starts an access point with the specified name
    //here  "AutoConnectAP"
    //and goes into a blocking loop awaiting configuration

    //WITHOUT THIS THE AP DOES NOT SEEM TO WORK PROPERLY WITH SDK 1.5 , update to at least 1.5.1
    if (!wifiManager.startConfigPortal("OnDemandAP")) {
      Serial.println("failed to connect and hit timeout");
      //reset and try again, or maybe put it to deep sleep

    //if you get here you have connected to the WiFi
    Serial.println("connected...yeey :)");

  // put your main code here, to run repeatedly:


add an input field on the Auto Connect Wif web page

This is not clear. Do you want to add an input field to the screen where the SSID and password are entered?

If so, look at the AutoConnectWithFSParameters example which is included with WiFiManager. It shows how to add 3 parameters to the configuration screen.

That's exactly what I want to do, and I have found that code. But when I look at serial monitor the program is returning rubbish. I will try and film and upload