Define form for field_attach_form I have an custome made entity

  function sbsl_order_entity_info() {
    $entitys = array();

    $entitys['sbsl_delivery_information'] = array(
      'label' =&gt; t('Delivery information'),
      'controller class' =&gt; 'EntityAPIController',
      'base table' =&gt; 'sbsl_delivery_information',
      'fieldable' =&gt; TRUE,
      'entity keys' =&gt; array(
        'id' =&gt; 'delivery_information_id',
        'bundle' =&gt; 'bundle',
      ),
      'bundle keys' =&gt; array(
        'bundle' =&gt; 'bundle',
      ),
      'bundles' =&gt; array(),
      'load hook' =&gt; 'sbsl_order_delivery_information_load',
      'view modes' =&gt; array(
        'full' =&gt; array(
          'label' =&gt; t('Full content'),
          'custom settings' =&gt; FALSE,
        ),
      ),
    );

    return $entitys;
  }


I want to attach a form to my widget with field_attach_form 

but can't figure out where i should define the form elements
You need to do more than simply declare the entity.  The Entity Examples in https://www.drupal.org/project/examples will walk you through each step in the process of declaring the entity, defining the form, and adding menu hooks to be able to manage the entities and the field structure for both the form and display.