Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CSS class to each form #14

Closed
tyxla opened this issue Jan 4, 2016 · 6 comments
Closed

Add a CSS class to each form #14

tyxla opened this issue Jan 4, 2016 · 6 comments
Labels

Comments

@tyxla
Copy link
Owner

tyxla commented Jan 4, 2016

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.

@tyxla tyxla added the feature label Jan 4, 2016
@tyxla
Copy link
Owner Author

tyxla commented Feb 5, 2016

Done: 3f7fa1d...47e5273

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 tyxla closed this as completed Feb 5, 2016
@zackphilipps
Copy link
Contributor

@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?

@tyxla
Copy link
Owner Author

tyxla commented Aug 2, 2017

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?

@zackphilipps
Copy link
Contributor

@tyxla I did a project search for gform, disabled all the filters I could find, and still no luck. 🤷‍♂️

@zackphilipps
Copy link
Contributor

zackphilipps commented Aug 2, 2017

@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. 🤷‍♂️

@tyxla
Copy link
Owner Author

tyxla commented Aug 3, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants