- This topic has 5 replies, 2 voices, and was last updated 5 years, 9 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘Generic’ is closed to new topics and replies.
Events Made Easy › Forums › Generic › Inline CSS not working for RSVP
Hi!
I try to hide fields in the RSVP form using <span style=”visibility: hidden;”>#_SEATS</span>
There is a post about it on the site: https://www.e-dynamics.be/wordpress/css-change-the-look-and-feel-of-any-element-on-the-page/
I don’t know when it broke, but it worked with an earlier release.
/Anders
When I save the RSVP form (either tamplate or directly on the event) it reverts to <span>#_SEATS</span>
/Anders
I confirm this. Currently too much sanitizing is happening from within the backend. I’ll see what can be done (while still abiding by the wordpress rules).
Maybe a long-term solution could be to implement something like the “REQ” prefix, a “HIDE” prefix that includes the field but hidden (just as “REQ” makes it required)?
/Anders
For custom fields there is a hidden field, for the standard rsvp fields: you either use them or not. The only exception is the #_SEATS, which normally should be used. Btw: if you don’t want to be used (because it is always 1), just put the min and max seats to book at 1, then the field will be hidden automatically. Otherwise there’s still the option of putting the css for hiding a field in your theme css file (or read up on eme.css in the doc concerning stylesheets).
Like I said: I need to analyze what the requirements are for sanitizing input so I can mimic the regular post-sanitizing here (which seems to be very open …). Currently it uses wp_kses_post, which only allows what wp allows (but you can allow more using kses-filters).
Wordpress is not allowing the inline css property visibility for span.
You can allow it via a wordpress hook:
https://developer.wordpress.org/reference/hooks/safe_style_css/
As I’m using the wp_kses_post function to sanitize input data, I’m bound by those rules …