Using an address field widget on a custom form and storing data I have a Subscription custom entity and I would like to use the default entity form for administration tasks and a custom multistep form for the subscription process.

I added an address field to my Subscription entity and I would like to use the widget in one of the custom form steps. 

I was expecting I could use something like '#type' =&gt; 'widget_id' plus some widget configuration, but it does not seem to be so simple as this answer points out.


  a widget and a form element are two different things that are used in different cases; consider a widget a more specialized type of form element.


What would be the right approach then? In the field_attach_form change record a comment suggests

$display = EntityFormDisplay::collectRenderDisplay($entity, 'default');
$display-&gt;buildForm($entity, $form, $form_state);


How do I get just my address field? Form display modes? 

And then, how do I deal with validating and storing the data properly?
You can limit the $form array's elements by setting their #access property to FALSE.

The validation and storing should be handled by the form for the corresponding entity by itself.