Field Formatter Class and limit number of characters I have to insert in a field (admin/structure/types/manage/article/display) a string of classes to get a button from a text but the "Field Formatter Class" field has a character limit so I can't enter the code which I need to get the result.
I did some research but couldn't find the solution.

My Class:
btn btn-sm btn-primary stpe-outlinebutton test-util-color-primary test-util-border-primary test-util-hover-background-primary test-util-hover-color-white test-util-hover-border-primary

Any help?

Best Regards
I believe you are using the module Field Formatter Class to have this option for your fields. 

The module does not set a maximum value for this field. So I believe it is using a default of 128 chars in core. 

128 is a fairly long limit for a class field. But if you want to alter this you can write an alter function in your module like they have done in their module and set the #maxlength property of the field_formatter_class element.

Having said that, the following is a quick hack to get this working for you. 

You can open the file field_formatter_class/field_formatter_class.module

and add a line 

'#maxlength' =&gt; 256,


in the element class array in the alter function in line 44. After modification this will be like the following (view original code)

function field_formatter_class_field_formatter_settings_form_alter(&amp;$settings_form, $context) {
  $display = $context['instance']['display'][$context['view_mode']];
  $settings = $display['settings'];
  $settings_form['field_formatter_class'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Field Formatter Class'),
    '#maxlength' =&gt; 256,
    '#default_value' =&gt; $settings['field_formatter_class'],
  );


Do note that this is modifying a contrib module and is generally not a recommended approach. You will have to maintain this patch in a patches folder.