We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I started using the date-input I was expecting to be able to pass in a label param.
{{ govukDateInput({ id: "dob", namePrefix: "dob", label: "What is your date of birth?" }) }}
In actual fact what I needed to pass was params.fieldset.legend.text:
{{ govukDateInput({ id: "dob", namePrefix: "dob", fieldset: { legend: { text: "What is your date of birth?" } } }) }}
The actual usage seems overly complex given that I expect most users just want to specify a string.
I accept the fieldset/legend isn't really a label in the html sense, so would propose one of the following:
govuk-frontend/src/components/date-input/template.njk
Line 90 in e70f59d
becomes (written in JS/pseudocode as I am still learning nunjucks):
legend: { text: params.label, ...params.fieldset.legend }
legend: isString(params.fieldset) ? { text: params.fieldset } : params.fieldset.legend
This is low priority for me personally, but suggested in case others think it worthwhile.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I started using the date-input I was expecting to be able to pass in a label param.
In actual fact what I needed to pass was params.fieldset.legend.text:
The actual usage seems overly complex given that I expect most users just want to specify a string.
I accept the fieldset/legend isn't really a label in the html sense, so would propose one of the following:
govuk-frontend/src/components/date-input/template.njk
Line 90 in e70f59d
becomes (written in JS/pseudocode as I am still learning nunjucks):
This is low priority for me personally, but suggested in case others think it worthwhile.
The text was updated successfully, but these errors were encountered: