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

Function equivalent to "GeoMashupUserUIManager::get_instance()->print_form()" to save instead of printing #811

Open
apolinario opened this issue Apr 27, 2018 · 1 comment

Comments

@apolinario
Copy link

I'm trying to use GeoMashupUserUIManager::get_instance()->print_form() as a Contact Form 7 field, however since this function prints the content, I'm not able to use it in a return. Is there a way to save that data to a variable for posterior use instead of directly printing?

@cyberhobo
Copy link
Owner

There's always good old output buffering:

ob_start();
GeoMashupUserUIManager::get_instance()->print_form();
$form_content = ob_get_clean();

An alternate method returning a string would be nice to avoid these shenanigans.

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