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

More Filters to Alter Form Arguments Programmatically #29

Open
stefan-wiebe opened this issue Feb 18, 2019 · 3 comments
Open

More Filters to Alter Form Arguments Programmatically #29

stefan-wiebe opened this issue Feb 18, 2019 · 3 comments
Milestone

Comments

@stefan-wiebe
Copy link

Hello,

would you be willing to add more filters to the plugin, in order to change the arguments passed to Pardot at runtime?
We specifically require one to alter the querystring in our use-case, so something like this:

$args['querystring'] = apply_filters( 'pardot_form_querystring', $args['querystring'] );

in the get_form_body()-function would be perfect.
Of course you could also just pass the entire args array.

Cheers

@logoscreative
Copy link
Contributor

Hey @stefanwiebe,

This is already possible with the pardot_form_embed_code_[Form ID] filter. Check them out in the README: https://github.com/Pardot/pardot-for-wordpress#filters

@stefan-wiebe
Copy link
Author

The issue for us is that the filter requires a specific form ID, unless it's possible to match filters partially?
We need to run it on every form, so it'd be difficult to maintain that way.

@logoscreative
Copy link
Contributor

logoscreative commented Feb 18, 2019

@stefanwiebe Gotcha. I can add this in a future version, but if you want to add parameters to every form, you can just use built-in WordPress filters. Either filter the content before shortcodes render and add a querystring attribute, or filter the content after shortcodes render and find the proper iframes.

@logoscreative logoscreative added this to the 1.5 milestone Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants