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

Multiple controls at same row #164

Closed
2 of 3 tasks
vicmosin opened this issue Sep 22, 2018 · 1 comment
Closed
2 of 3 tasks

Multiple controls at same row #164

vicmosin opened this issue Sep 22, 2018 · 1 comment

Comments

@vicmosin
Copy link

vicmosin commented Sep 22, 2018

  • bug

  • enhancement

  • question

  • CakePHP Version: 3.6.

  • Plugin Version/Branch: dev-4.0.1-alpha.

Any chance to implement multiple controls within same row at forms (similar to https://getbootstrap.com/docs/4.1/components/forms/#form-row) with current version?

@Holt59
Copy link
Collaborator

Holt59 commented Sep 22, 2018

This is similar to #70 (old one... ) but with Bootstrap 4. I am currently lacking time to implement new features, but a quick workaround would be to alter the correct template:

// Update the inputContainer template.
$this->Form->setTemplate('inputContainer', '<div class="form-group col-md-6 {{type}}{{required}}">{{content}}</div>');

// Open the form-row div manually.
echo '<div class="form-row">';

// Output your controls:
echo $this->Form->control(...);
echo $this->Form->control(...);

echo '</div>';

// Reset the template
$this->Form->setTemplate('inputContainer', '<div class="form-group {{type}}{{required}}">{{content}}</div>');

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