mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-28 01:25:49 +03:00
[GH-ISSUE #1112] Add parameter separators #950
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#950
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Lithimlin on GitHub (Aug 20, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1112
Is it possible to add (named) separators between sets of parameters? Pages with a lot of parameters tend to get cluttered quickly. Separators, especially named ones, would greatly improve the readability.
Is it maybe already possible to add separators using a special custom string?
@tablatronix commented on GitHub (Aug 20, 2020):
no, but good idea, in the alpha version the inputs already have labels now though
@Lithimlin commented on GitHub (Aug 20, 2020):
Even then it is nice to put parameters into categories sometimes.
I just tried adding come custom CSS to the Head, however, that did not work out so nicely and instead it was shown at the top of the page.
I tried using CSS/HTML code from this stackoverflow post and then adding the
"class=\"seperator\""as a cutsom HTLM for the Parameter. Any advice on how to do it correctly?@Lithimlin commented on GitHub (Aug 20, 2020):
Here's the code to be more clear:
And for the parameter:
@tablatronix commented on GitHub (Aug 20, 2020):
Yeah that is what I would do, add a class, then add that to your params.
use like a :before css psuedo class to add a HR before the param
Not sure why it woudn't work, might have a syntax issue there, try saving the html and see what wrong
@Lithimlin commented on GitHub (Aug 21, 2020):
I'm not sure what you mean by "saving the HTML". You mean the one of the captive portal config page?
@tablatronix commented on GitHub (Aug 21, 2020):
Yeah look at the source see whats wrong
@Lithimlin commented on GitHub (Aug 24, 2020):
I've come so far to say that it's not easily possible without changing things in the library.
In
strings_en.h, there are the constantsHTTP_FORM_LABEL[]andHTTP_FORM_PARAM[]:The
class="separator"would need to go in the label and the input would need to be ignored. As far as I can see though, you cannot manipulate the label for parameters, just the input.I also figured out why the style didn't apply: There was a
<style>[...]</style>wrapper missing. The final code for that, including stuff for the invert class, looks like this for me:@Lithimlin commented on GitHub (Aug 24, 2020):
Another thing I want to add is that if I try to add a
SeparatorParametersomewhere, it and the following parameters are not added to the_paramslist in theWiFiManagerwhich I don't really understand.@Lithimlin commented on GitHub (Aug 24, 2020):
Setting the value length in the
initto 4 (or something greater than 0) helped, but as mentioned before, now I still have the input box that I don't need and cannot apply the separator class to the label@Lithimlin commented on GitHub (Aug 25, 2020):
I have found a solution:
This uses only the
customHtmlfield and will not create an input box since theidfield isNULL@tablatronix commented on GitHub (Aug 25, 2020):
still do not know why you have a problem with adding custom class to one input and have a seperator after that, using the custom attr for that input, should not affect labels