• Is it possible to as a element id for tracking purposes. Contact form & allows for the addition or a class or id in their shortcode

    this is from COntact form 7 frequently asked questions, this method does not work with your shortcode.

    Can I add id and class attributes to a form element?

    Yes. You can add any id and class to a form by adding the html_id and html_class attributes into a [contact-form-7] shortcode.

    Example:

    [contact-form-7 id=”1234″ title=”Contact form 1″ html_id=”contact-form-1234″ html_class=”form contact-form”]

    thank you!

    https://wordpress.org/plugins/email-before-download/

Viewing 1 replies (of 1 total)
  • No, you can’t add html_id or html_class or really anything else to the [email-download] shortcode call & have those extra parameters get passed through to the [contact-form-7] shortcode call that happens behind the scenes. You would need to modify email-before-download.php in a couple of places to support that. Alternatively, you could use like jquery or whatever to modify the form tag onLoad of the page.

    (Technically, it looks to me like you could be really clever and jam stuff into the Title attribute of the [email-download] shortcode & perhaps do what you want, but it would be ugly, involving embedding double quotes & such in there — if you’re gonna get that hackish you might as well just modify the php itself)

Viewing 1 replies (of 1 total)

The topic ‘Element ID’ is closed to new replies.