-
Notifications
You must be signed in to change notification settings - Fork 724
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
Show help text alongside field if specified #1150
base: master
Are you sure you want to change the base?
Conversation
I think this is a great addition. I was wondering about screen readers and whether the help text ought to be linked to the input, e.g. by a "label for". This page suggests using " ... actually this page has a better summary: https://www.w3.org/WAI/tutorials/forms/instructions/ |
I'm using this on my ng-admin powered site, and it works great, thanks. I've extended the code so that you can use HTML markup and/or Angular markup in the help text where necessary. Can I create a PR for a PR? Or should I create a separate PR that includes this code? I have some fields which change their meaning based on the "type" of the row, and I wanted the help-text to vary. You can use it like:
My changes are at: RichardBradley@c9f404b |
Any progress on this. Would love to have this feature. |
Just cherry-picked your commit @RichardBradley |
@@ -9,7 +9,7 @@ | |||
"url": "git://github.com/marmelab/ng-admin.git" | |||
}, | |||
"devDependencies": { | |||
"admin-config": "^0.11.0", | |||
"admin-config": "stevehalford/admin-config#field-descriptions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use new admin-config release once your marmelab/admin-config#72 PR has been released.
Can you add some unit tests for your directive? |
👍 Please rebase this PR to ensure tests are fine. :) |
(If you're making changes here, it would also be nice to update the docs to explain how to use the non-string case of helpText. Maybe add the example from my comment above starting "You can use it like:" to Field.md, if it still works after jpetitcolas's changes.) |
Adds help text or a description alongside fields (write only)
Related: marmelab/admin-config#72
The directives template can be overridden to achieve this #791