Skip to content

Instantly share code, notes, and snippets.

@markbalt
Created June 19, 2014 13:30
Show Gist options
  • Save markbalt/7cb088c4b31ae76e4034 to your computer and use it in GitHub Desktop.
Save markbalt/7cb088c4b31ae76e4034 to your computer and use it in GitHub Desktop.
Render Modal form with widget field that requires renderJS
<?php
protected function executeModalFormAjax(sfWebRequest $request)
{
eval(sprintf
(
'$form = new %sForm();',
$request->getParameter('form')
));
return (string) $form.' <script>'.$form['user_id']->renderJS().'</script>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment