Custom form field attributes in form designer
Jamroom Developers
Thanks Michael, I think I'm going to take your first suggestion and just link to the module docs by appending a line to all form designer options help text (if the color picker is installed):
/**
* Append to help text of form designer options field
* @param $_data array Array of information from trigger
* @param $_user array Current user
* @param $_conf array Global Config
* @param $_args array additional parameters passed in by trigger caller
* @param $event string Triggered Event name
* @return array
*/
function ujFullSpectrum_form_field_create_listener($_data, $_user, $_conf, $_args, $event)
{
if (isset($_data['name']) && $_data['name'] == 'options' && isset($_data['sublabel']) && $_data['sublabel'] == 'see <strong>help</strong> for what is allowed here') {
$_data['help'] = $_data['help'].'<br><br>• If this is a <strong>spectrum</strong> color picker field, the options can be used to configure the color picker. See the module docs for details.';
}
return $_data;
}
).