Commit b2b349aa authored by Penny Leach's avatar Penny Leach
Browse files

added help icon callback

parent a833cd6b
......@@ -83,7 +83,13 @@ function pieform_renderer_table(Pieform $form, $builtelement, $rawelement) {
// Contextual help
if (!empty($rawelement['help'])) {
$result .= ' <span class="help"><a href="#" title="' . Pieform::hsc($rawelement['help']) . '">?</a></span>';
$function = $form->get_property('helpcallback');
if (function_exists($function)) {
$result .= $function($form, $rawelement);
}
else {
$result .= ' <span class="help"><a href="#" title="' . Pieform::hsc($rawelement['help']) . '">?</a></span>';
}
}
$result .= "</td>\n\t</tr>\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment