Closed tyxla closed 8 years ago
New class will be added to the .gform_wrapper
div, and is called gform_wrapper_original_id_123
, where 123
is the original form ID.
@tyxla have you seen any issues where the class doesn't get added?
See https://www.braunability.com/wheelchair-accessible-pacifica/
If you scroll down to this section, and click on the "Contact a Dealer" and "Email Us" links, you'll see that "Contact" gets the original ID, while "Email" does not.
Any ideas as to why this would happen?
Hi @zackphilipps, I can't say for sure without seeing the exact implementation, but the behavior inconsistency seems to me that it's an implementation issue, which is not related with the plugin. Perhaps your theme or any of your plugins is filtering the classes?
@tyxla I did a project search for gform
, disabled all the filters I could find, and still no luck. 🤷♂️
@tyxla Looks like the issue occurs if the "CSS class" FORM setting is populated. It's also related to this forum post: https://wordpress.org/support/topic/issue-with-classes-with-original-form-id/
I'll submit a PR.
Edit: actually, my initial comment was wrong. There was no CSS class on the form. 🤷♂️
I've just merged #26, will make sure to include it in the new version once it's released.
Thanks so much for your contribution, @zackphilipps!
Add a CSS class that contains the original ID of the form, allowing styling specific forms. For example such class can be
gf-original-id-5
.