- 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺
Just added the None option. Very useful feature.
- 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺
Actually breaks W3C compliance. When not filled, it is adding an empty target attribute which is not valid.
target=""
- 🇮🇳India shivam_tiwari
@flocondetoile I worked here and checked target attribute on the link. If we use none option for target then an empty target attribute comes with link tag. Can we create a separate Field Formatter for this?
cc @maintainers - 🇫🇷France flocondetoile Lyon
A field formatter is not in the scope of this module. It's not the right way to support this.
- 🇮🇳India shivam_tiwari
@flocondetoile I worked on it. Added a checkbox for the setting of this link-target field by the field widget file. This means if user makes setting for display target field with the link class field then only it will show on the link field-related forms.
But if user sets to none option then on the link field empty target attribute comes. Actually, it is related to form API. If we take any field, after submitting the form, form api is taking all the form fields.
Can we not remove the none option from target field? Because none option and Open in the same window (_self) attribute work same and link will open in the current window only. We can also apply JS for checking and removing the empty target attribute by module but I think it will not be a good method. Because this will check all the links on the page. Same thing will apply for preprocess also, it will apply on all the links.
Can you please guide me here, what can we do?