Comments (5)
Original comment by l (Bitbucket: lilHermit, GitHub: lilHermit)
Released 4.0.0.4002
from cakephp-plugins-bootstrap4.
Original comment by l (Bitbucket: lilHermit, GitHub: lilHermit)
Fixed in c755d46
from cakephp-plugins-bootstrap4.
Original comment by l (Bitbucket: lilHermit, GitHub: lilHermit)
Ok it looks like the plugin isn't adding the required
class currently I'll fix that in the next release.
As a current workaround try:
label.required:after {
content: " *";
color: red;
}
</style>```
and with the following PHP
```php
echo $this->Form->control('given_name', [
'label' => ['class' => 'required'],
'required' => true
]);
from cakephp-plugins-bootstrap4.
Original comment by Thomas Georgiadis (Bitbucket: ThomasNucleus, GitHub: ThomasNucleus)
It doesn't seem like a required class is being added to the form-group class div
#!html
<div class="form-group <!--required missing?-->">
<label class="col-form-label" for="person-given-name">Given Name</label>
<input type="text" name="person[given_name]" required="required" id="person-given-name" class="form-control" value="Test 1">
</div>
Also wouldn't that css put the asterisk where I've indicated with a black asterisk?
Ideally I would like the the asterisk to be right next to the label. I can tweak that css to work if either the form-group or label has a required class.
from cakephp-plugins-bootstrap4.
Original comment by l (Bitbucket: lilHermit, GitHub: lilHermit)
I'd suggest the best way would be via css rather than messing with the CakePHP templates
Something like?
div.form-group.required:after { content:" *"; color:red; }
from cakephp-plugins-bootstrap4.
Related Issues (15)
- Add ability to add custom classes to label templates HOT 13
- A little improvement in installation guide (documentation) HOT 1
- Date format issues when html5Render is disabled HOT 1
- Checkbox field has no visible checked state in Layout type Grid HOT 3
- custom file form input HOT 5
- Add new "confirmJS" template to templates array HOT 4
- Add 'type' of 'submit' to prepend/append buttons HOT 1
- Possible bug with hidden fields and cakephp 3.7.3 HOT 2
- Could you please tag this v3.7-compatible release? HOT 1
- bootstrapCss/Script does not exist HOT 3
- cant bake with dev-master version HOT 3
- update bitbucket branch HOT 2
- Use of depreciated methods and depreciated parameter access HOT 3
- buttonwidget? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-plugins-bootstrap4.