Custom form field attributes in form designer
Jamroom Developers
For any additional attributes that you want to make available in your custom _display() function, you need to create a separate _attributes() function - all it needs to do is return an array of allowed attributes - i.e.
function jrCore_form_field_live_search_attributes()
{
return array('disabled', 'readonly', 'maxlength', 'onfocus', 'onblur', 'onselect', 'onkeypress', 'style');
}
So that's the attributes function for the "live_search" form field type. The array that it returns are going to be the additional attributes that are allowed to be passed into the the jrCore_form_field_create() function. So you would create that function, and return the array of attributes you want to support - then you would use them like your second example above.
Hope this helps!