When rendering a 'radios' form element that doesn't have a defined title (e.g. when also using the admin module), the following notice is displayed:

Notice: Undefined variable: title in mobile_jquery_radios() (line 128 of /Users/cmillward/Development/Personal/scratch/mobile_jquery/includes/modules/form.inc).

Comments

millwardesque’s picture

Attached patch.

minoroffense’s picture

Status: Active » Needs review

Want to give me a quick rundown of the patch? Does the radio element in jqm require a title?

millwardesque’s picture

The patch just checks for the existence of $element['#title'] and, if not set, uses a null string when rendering the HTML.

I couldn't find a definitive source on whether the #title element is required for the 'radios' element or not, but I've encountered this issue when the admin module is installed and visible.

minoroffense’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. And the I've checked the docs, no mention of whether title is required (not like we can force all form elements to have a title anyways).