[6.x]: LinkControl.vue always displays the “Label” field even when showLabelField is false
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start in resources/js/modules/forms/LinkControl.vue and inspect how showLabelField is passed to craft-link-field, comparing it with the neighboring modelValue and advancedFields bindings. Verify the Control Panel hides the Label input when showLabelField is false and still displays it when true.
Written by the indexing model from the issue text.
Description
What happened?
Description
When a Link field has showLabelField set to false (either via a custom Link field's settings or via a custom/native field layout element configuring a LinkControl), the "Label" input is still rendered in the Control Panel.
AI Says:
In resources/js/modules/forms/LinkControl.vue, the property is bound as an attribute rather than a DOM property:
<!-- Current -->
<craft-link-field
:types="control.props.types"
.modelValue="value"
:name="editable ? inputName(control.path) : ''"
:show-label-field="control.props.showLabelField"
.advancedFields="control.props.advancedFields"
:disabled="!editable"
@apply="apply"
/>
Changing the binding from an attribute to a DOM property using the . prefix, consistent with .modelValue and .advancedFields appears to address this:
.showLabelField="control.props.showLabelField"
Craft CMS version
6.0.0-alpha.19
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 17h 21m
- Merged PRs (30d)
- 199
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from craftcms/cms
-
bug repo:cms
Difficulty 3/5 1-2 days Newbie friendliness 68/100
craftcms/cms#19809 · 1 comment ·
Maintainers usually reply within 1 day
-
bug repo:cms
Difficulty 3/5 1-2 days Newbie friendliness 68/100
craftcms/cms#19808 · 2 comments ·
Maintainers usually reply within 1 day
-
bug repo:cms
Difficulty 3/5 1-2 days Newbie friendliness 68/100
craftcms/cms#19807 · 1 comment ·
Maintainers usually reply within 1 day
-
bug repo:cms
Difficulty 4/5 3-5 days Newbie friendliness 45/100
craftcms/cms#19805 · 1 comment ·
Maintainers usually reply within 1 day
-
bug repo:cms
Difficulty 3/5 1-2 days Newbie friendliness 53/100
craftcms/cms#19803 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PrestaShopCorp/ps_accounts#666 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 6 days
-
Security SecurityBundle
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
symfony/symfony-docs#23173 ·
Maintainers usually reply within 3 days
-
incomplete
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opnsense/plugins#5763 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
fossology/fossology#3893 · 1 comment ·
Maintainers usually reply within 2 days