[GH-ISSUE #1719] Custom page addition matching current layout and format #1458

Open
opened 2026-02-28 01:30:09 +03:00 by kerem · 0 comments
Owner

Originally created by @letis009 on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1719

Basic Infos

Awesome library guys. really is a lifesaver.
Feature request maybe or just missing instructions.
We looking to use CSS format set in Main and PARAMS,
going to /custom presents a blank page with text, is there a method to use all the styles and scripts from index and params ?

I have already added backgrounds and icons to styling but do I need to duplicate the entire page in code again ?

Hardware

WiFimanager Branch/Release: Master

Esp8266/Esp32: ESP32c3

Hardware: Custom ESP32C3 board

Description

Problem description

Settings in IDE

Arduino Release v2.0.14 based on ESP-IDF v4.4.6

Module: esp32c3

Additional libraries:

Sketch

#BEGIN
#include <Arduino.h>
#include "WiFiManager.h"

void saveWifiCallback(){
  Serial.println("[CALLBACK] saveCallback fired");
}

//gets called when WiFiManager enters configuration mode
void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("[CALLBACK] configModeCallback fired");
  // myWiFiManager->setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); 
  // Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  // Serial.println(myWiFiManager->getConfigPortalSSID());
  // 
  // esp_wifi_set_bandwidth(WIFI_IF_AP, WIFI_BW_HT20);
}

void handleRoute(){
  Serial.println("[HTTP] handle route");
  wm.server->send(200, "text/plain", "hello from user code");
}

void bindServerCallback(){
  wm.server->on("/custom",handleRoute); // this is now crashing esp32 for some reason
  // wm.server->on("/info",handleRoute); // you can override wm!
}
void setup() {
    wm.setWebServerCallback(bindServerCallback);
    wm.setCustomHeadElement(icon);
    wm.setCustomHeadElement(base64img);
    const char* menuhtml = "<form action='/custom' method='get'><button>Advanced</button></form><br/>\n";
    wm.setCustomMenuHTML(menuhtml);
    std::vector<const char *> menu = {"wifi", "update", "info", "param", "custom", "sep", "restart", "exit"};
    wm.setMenu(menu);
}

void loop() {

}
#END

Debug Messages

messages here
Originally created by @letis009 on GitHub (Mar 11, 2024). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1719 ### Basic Infos Awesome library guys. really is a lifesaver. Feature request maybe or just missing instructions. We looking to use CSS format set in Main and PARAMS, going to /custom presents a blank page with text, is there a method to use all the styles and scripts from index and params ? I have already added backgrounds and icons to styling but do I need to duplicate the entire page in code again ? #### Hardware WiFimanager Branch/Release: Master Esp8266/Esp32: ESP32c3 Hardware: Custom ESP32C3 board ### Description Problem description ### Settings in IDE Arduino Release v2.0.14 based on ESP-IDF v4.4.6 Module: esp32c3 Additional libraries: ### Sketch ```cpp #BEGIN #include <Arduino.h> #include "WiFiManager.h" void saveWifiCallback(){ Serial.println("[CALLBACK] saveCallback fired"); } //gets called when WiFiManager enters configuration mode void configModeCallback (WiFiManager *myWiFiManager) { Serial.println("[CALLBACK] configModeCallback fired"); // myWiFiManager->setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); // Serial.println(WiFi.softAPIP()); //if you used auto generated SSID, print it // Serial.println(myWiFiManager->getConfigPortalSSID()); // // esp_wifi_set_bandwidth(WIFI_IF_AP, WIFI_BW_HT20); } void handleRoute(){ Serial.println("[HTTP] handle route"); wm.server->send(200, "text/plain", "hello from user code"); } void bindServerCallback(){ wm.server->on("/custom",handleRoute); // this is now crashing esp32 for some reason // wm.server->on("/info",handleRoute); // you can override wm! } void setup() { wm.setWebServerCallback(bindServerCallback); wm.setCustomHeadElement(icon); wm.setCustomHeadElement(base64img); const char* menuhtml = "<form action='/custom' method='get'><button>Advanced</button></form><br/>\n"; wm.setCustomMenuHTML(menuhtml); std::vector<const char *> menu = {"wifi", "update", "info", "param", "custom", "sep", "restart", "exit"}; wm.setMenu(menu); } void loop() { } #END ``` ### Debug Messages ``` messages here ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1458
No description provided.