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

Problematic styling of groups (default form renderer) #30

Open
kahi opened this issue Jun 16, 2014 · 2 comments
Open

Problematic styling of groups (default form renderer) #30

kahi opened this issue Jun 16, 2014 · 2 comments

Comments

@kahi
Copy link

kahi commented Jun 16, 2014

Since I cannot use addGroup() inside addDynamic(), I'm having trouble styling these "groups" of elements – or at least separate them from each other.

What are the options/best practices to this currently? Thank you.

@fprochazka
Copy link
Member

Hi, I always render and style replicated inputs manually. I just write the template that foreaches the inputs.

@jspetrak
Copy link

jspetrak commented Jun 1, 2017

@fprochazka Is there any example how to manually template just part of the form? I have form class that has a configured renderer and it just does not create any HTML surrounding a single addDynamic() container.
Render the complete form manually would be the last resort solution.

Or is there any chance to extend the form renderrer to style dynamic containers?

I have also tried to use Container#setCurrentGroup but does not have any effect.
$this->addDynamic('legs', function (Container $container) { $cg = new ControlGroup(); $cg->setOption('container', 'section class=oneLeg'); $container->setCurrentGroup($cg); $container->addText('from', 'From'); $container->addText('to', 'To'); }, 1);

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