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

Using with Templates #6

Open
Omegatcu opened this issue Jun 2, 2016 · 1 comment
Open

Using with Templates #6

Omegatcu opened this issue Jun 2, 2016 · 1 comment

Comments

@Omegatcu
Copy link

Omegatcu commented Jun 2, 2016

Hello and thank you for your work.

Is it possible to save the whole form in a Variable so i can send the output to a Template like Twig or Smarty?

@julienbohy
Copy link

julienbohy commented Sep 12, 2016

Hello.

I have the same problem.

I use this workaround :

<?php

public static function getForm()
{
    ob_start();
    \Form::open("user", $_POST, ['view' => "SideBySide"]);
    \Form::Hidden("Id");
    \Form::Hidden('form', 'user');
    \Form::TextBox(gettext("Nom") . " : ", "nom", array("required" => 1));
    \Form::TextBox(gettext("Prenom") . " : ", "prenom", array("required" => 1));
    \Form::Button(gettext("Enregistrer"));
    \Form::Button(gettext("Annuler"), "button");
    \Form::close(false);
    $form = ob_get_contents();
    ob_end_clean();
    return $form;
}

?>

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

No branches or pull requests

2 participants