drupal 8 form alter to load paragraph fields code example
Example: alter paragraph form drupal 8
/**
* Implements hook_field_widget_WIDGET_TYPE_form_alter().
*/
function paragraphs_test_field_widget_entity_reference_paragraphs_form_alter(&$element, &$form_state, $context) {
if ($element['#paragraph_type'] == 'altered_paragraph') {
$element['subform']['field_text']['widget'][0]['#title'] = 'Altered title';
}
}