Hi, I think it would be useful an option on fields' edit page to specify if showing the help text before or after the field value. Now the help text position is fixed below the field (and I can't find any module which adapts it), but in certain situation it helps more if it's above. For example on a subscription checkbox where the explanation is important to be red before checking for accepting.

Edited:
This is a potential duplicate of #314385: Make position of #description configurable via the API. Read there for background discussion.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito’s picture

Status: Active » Needs review
FileSize
3.97 KB

I had a look at it and made a kickoff patch for starting work on this. Let's see what the community thinks about this feature and the patch itself. The patch doesn't add the option to the UI yet, but gives the option settings throught hook_element_alter(). Tests needed too.

penyaskito’s picture

Issue tags: +Needs tests
mandreato’s picture

I've just installed your patch. It seems not hurting normal behaviour.
So, is next step to add an option to UI ?

penyaskito’s picture

Yep. But I'm not sure where this option should remain.

My first thought is another column in admin/structure/types/manage/toc/display, but not sure if this should be a global setting of the field instead.

xjm’s picture

Status: Needs review » Needs work

This is an interesting suggestion. I can recall wanting to be able to change this in the past.

Do we necessarily need a UI option for this? I would probably support adding the property to FAPI, but changes to the UI require more deliberation. Maybe we could decide whether to add the property to FAPI first, and then open a followup issue to add a UI option for it?

Also, note that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades). Of course, we still need tests as well.

If you need help rerolling this patch, you can come to core office hours or ask in #drupal-gitsupport on IRC.

xjm’s picture

Component: field system » forms system
penyaskito’s picture

Patch rerolled.

penyaskito’s picture

Status: Needs work » Needs review
FileSize
5.96 KB

Let's see if these tests pass.

Status: Needs review » Needs work

The last submitted patch, field-description-before-1325488-7.patch, failed testing.

penyaskito’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
6.29 KB

Fixed the tests. The xpath expressions were wrong in the assertions.

Status: Needs review » Needs work

The last submitted patch, field-description-before-1325488-8.patch, failed testing.

penyaskito’s picture

This seems to be an undeterministic test of statistics failing (see #1346772: StatisticsLoggingTestCase->testLogging() fails with clean URLs in some environments). Retesting.

penyaskito’s picture

Status: Needs work » Needs review
Bojhan’s picture

Please see, http://drupal.org/node/314385

I dont think we should add a UI option for this, I understand the usecase - but its perfectly fine for contrib to start using this first.

penyaskito’s picture

This is a potential duplicate of #314385: Make position of #description configurable via the API. Read there for background discussion.

yoroy’s picture

Status: Needs review » Closed (duplicate)

Duplicate indeed

yoroy’s picture

Issue summary: View changes

Added reference to a issue with more description.