The issue is simple
In all HTML editable files or editors (even in Classic WP Editor) you can add HTML Comments like so
<!-- This is a comment -->
In CRED Forms those comments get removed. When you add such comments to the expert mode, and visit the page with the form and open the console to inspect the element the comments are gone.
Is there any reason why?
First, I spend once again finding that this peculiarity only happens in Toolset.
Second, I think it is really a nice thing to have for development when you work on big projects. It is good to have a comment in the console. That is what they are made for.
I tested this on 2 different sites, so I am pretty sure it is replicable. It's a bit of a snowflake, really.
Another such thing is the radio inputs being nested in Labels, which is - by common suggestion of all posts and tutorials you might find - the possibly most unsuggested way to implement a radio input, for styling purposes it is so much easier to have them separate.
Well, while this issue is as it is I really don't understand why we are not allowed to have HTML comments in a form of Toolset?
Perhaps I miss something?
Hi Beda,
I can reproduce this and HTML comments added in the Forms editor are not included in the form's markup on the front-end.
I also get your point about associating the labels for the radio input fields implicitly, whereas the explicit association would be easier to style and offer better accessibility support.
( ref: hidden link )
I've passed on your feedback about both these points to the concerned team and will keep you updated through this ticket.
regards,
Waqar
Thanks Waqar!
Can we leave this open until we get some feedback?
Thanks!
Hi Beda,
Sure, I'll let you know once I have some updates on both those questions.
regards,
Waqar
Hi Beda,
Thank you for waiting and I've received some updates from the developers.
1. HTML comments in Form editor:
As it is something that is not frequently used or requested, it has been termed as “Won’t fix” for now, in favor of more pressing and/or requested tasks.
2. Radio input fields labels:
We already have an existing internal ticket for similar markup changes for the labels in the View's search filters and it has been accepted to be improved for the form fields too.
I don't have a time estimate to share at the moment, but, I'll keep you updated through this ticket.
regards,
Waqar