A FormAPI element like this:

$form['foo'] = array('#value' => 'bar');

should be converted to this:

$form['foo'] = array('#markup' => 'bar');

'#value' is used by other elements, so this only applies when '#value' is the only property of an element.

Comments

solotandem’s picture

Category: bug » feature

Are the upgrade routines attempting to change this now? If not, it is a feature request, not a bug.

Can you supply a patch?

joe huggans’s picture

thankyou I was trying to figure this out for ages, I have now successfully added some markup above my form!!

Result!

klausi’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Coder 7.x-1.x is frozen now and will not receive any updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.