[GH-ISSUE #678] custom html parameters #565

Closed
opened 2026-02-28 01:25:53 +03:00 by kerem · 1 comment
Owner

Originally created by @Laserlicht on GitHub (Jul 27, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/678

Basic Infos

Hardware

WiFimanager Branch/Release: Development

Esp8266/Esp32:

Hardware: ESP32

Core Version: staging

Description

Bug in develop branch: custom html parameters aren't possible.
They aren't visible on page.

For example:

WiFiManagerParameter custom_text("<p>This is just a text paragraph</p>");
wifiManager.addParameter(&custom_text);

Sketch

I have to comment out the following lines to solve the problem (WiFiManager.cpp).
Custom-HTML-Parameter don't have an ID.

  /*if(p->getID()){
    for (size_t i = 0; i < strlen(p->getID()); i++){
       if(!(isAlphaNumeric(p->getID()[i])) && !(p->getID()[i]=='_')){
        DEBUG_WM(DEBUG_ERROR,"[ERROR] parameter IDs can only contain alpha numeric chars");
        return false;
       }
    }
  }*/
      /*if (_params[i] == NULL || _params[i]->_length == 0) {
        DEBUG_WM(DEBUG_ERROR,"[ERROR] WiFiManagerParameter is out of scope");
        break;
      }*/
Originally created by @Laserlicht on GitHub (Jul 27, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/678 ### Basic Infos #### Hardware WiFimanager Branch/Release: Development Esp8266/Esp32: Hardware: ESP32 Core Version: staging ### Description Bug in develop branch: custom html parameters aren't possible. They aren't visible on page. For example: ``` WiFiManagerParameter custom_text("<p>This is just a text paragraph</p>"); wifiManager.addParameter(&custom_text); ``` ### Sketch I have to comment out the following lines to solve the problem (WiFiManager.cpp). Custom-HTML-Parameter don't have an ID. ``` /*if(p->getID()){ for (size_t i = 0; i < strlen(p->getID()); i++){ if(!(isAlphaNumeric(p->getID()[i])) && !(p->getID()[i]=='_')){ DEBUG_WM(DEBUG_ERROR,"[ERROR] parameter IDs can only contain alpha numeric chars"); return false; } } }*/ ``` ``` /*if (_params[i] == NULL || _params[i]->_length == 0) { DEBUG_WM(DEBUG_ERROR,"[ERROR] WiFiManagerParameter is out of scope"); break; }*/ ```
kerem 2026-02-28 01:25:53 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tablatronix commented on GitHub (Aug 7, 2018):

I didnt even realize you could do this, I thought that was a constructor doh

<!-- gh-comment-id:411164997 --> @tablatronix commented on GitHub (Aug 7, 2018): I didnt even realize you could do this, I thought that was a constructor doh
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#565
No description provided.