ui_patterns icon indicating copy to clipboard operation
ui_patterns copied to clipboard

275 form fields processing

Open manuel-adan opened this issue 6 years ago • 0 comments

Initial approach to make form fields be processed. This proposes an additional / alternate way to define pattern fields content in render arrays, by adding them as direct regular render children as follows:

    $form['content'] = [
      '#type' => 'pattern',
      '#id' => 'call_to_action',
      '#variant' => 'jumbotron',
      'title' => [
        '#markup' => $this->t('Explore our catalog'),
      ],
      'lead' => [
        'text' => [
          '#type' => 'textfield',
          '#required' => TRUE,
          '#placeholder' => $this->t('Product name, brand, reference...'),
        ],
      ],
      'action_link' => [
        'actions' => [
          '#type' => 'actions',
          'submit' => [
            '#type' => 'submit',
            '#value' => $this->t('Search'),
          ],
        ],
      ],
    ];

manuel-adan avatar Sep 30 '19 18:09 manuel-adan