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

Latte macros {label} and {input} ignores custom form renderer #32

Closed
peterpp opened this issue Aug 7, 2014 · 2 comments
Closed

Latte macros {label} and {input} ignores custom form renderer #32

peterpp opened this issue Aug 7, 2014 · 2 comments

Comments

@peterpp
Copy link

peterpp commented Aug 7, 2014

Let's have a form with custom renderer:

$form->setRenderer(new CustomFormRenderer());

and this latte template:

{form customForm}
    {label name /}
    {input name}
{/form}

Than CustomFormRenderer is not applied while rendering label and input.

Here is a quick workaround:

{form customForm}
    {var $label = $form->renderer->renderLabel($form[name])}
    {$label}
    {var $control = $form->renderer->renderControl($form[name])}
    {$control}
{/form}

Something like this should be generated automatically.

@dg
Copy link
Member

dg commented Feb 16, 2015

This is intentional behavior.

@dg dg closed this as completed Feb 16, 2015
@rauwebieten
Copy link

You can call
$form->renderer->renderPair($form[name])

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

3 participants