Submit form load results instead of messages I am testing out the new Drupal 8 custom modules and currently stuck with the submit form handler to load form submitted results in the same page and my current functions of last submit is this (inside the controller form) :

    &lt;?php
/**
 * @file
 * Contains \Drupal\resume\Form\ResumeForm.
 */
namespace Drupal\resume\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

class ResumeForm extends FormBase {
  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'resume_form';
  }

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {

    $form['candidate_name'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Candidate Name:'),
      '#required' =&gt; TRUE,
    );

    $form['candidate_mail'] = array(
      '#type' =&gt; 'email',
      '#title' =&gt; t('Email ID:'),
      '#required' =&gt; TRUE,
    );

    $form['candidate_number'] = array (
      '#type' =&gt; 'tel',
      '#title' =&gt; t('Mobile no'),
    );

    $form['candidate_dob'] = array (
      '#type' =&gt; 'date',
      '#title' =&gt; t('DOB'),
      '#required' =&gt; TRUE,
    );

    $form['candidate_gender'] = array (
      '#type' =&gt; 'select',
      '#title' =&gt; ('Gender'),
      '#options' =&gt; array(
        'Female' =&gt; t('Female'),
        'male' =&gt; t('Male'),
      ),
    );

    $form['candidate_confirmation'] = array (
      '#type' =&gt; 'radios',
      '#title' =&gt; ('Are you above 18 years old?'),
      '#options' =&gt; array(
        'Yes' =&gt;t('Yes'),
        'No' =&gt;t('No')
      ),
    );

    $form['candidate_copy'] = array(
      '#type' =&gt; 'checkbox',
      '#title' =&gt; t('Send me a copy of the application.'),
    );

    $form['actions']['#type'] = 'actions';
    $form['actions']['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; $this-&gt;t('Save'),
      '#button_type' =&gt; 'primary',
    );
    return $form;
  }

  /**
   * {@inheritdoc}
   */
    public function validateForm(array &amp;$form, FormStateInterface $form_state) {

      if (strlen($form_state-&gt;getValue('candidate_number')) &lt; 10) {
        $form_state-&gt;setErrorByName('candidate_number', $this-&gt;t('Mobile number is too short.'));
      }

    }

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &amp;$form, FormStateInterface $form_state) {

   // drupal_set_message($this-&gt;t('@can_name ,Your application is being submitted!', array('@can_name' =&gt; $form_state-&gt;getValue('candidate_name'))));

    foreach ($form_state-&gt;getValues() as $key =&gt; $value) {
      drupal_set_message($key . ': ' . $value);
    }

   }
}


I wanted to show results in a table in the same page form where user submit the form, rather than just throwing in messages

thank you
The example of @Ajay was not working for me. 
This one do. Hope this help.

public function buildForm(array $form, FormStateInterface $form_state) {

    // Your $form fields here ...

    $form['actions']['#type'] = 'actions';
    $form['actions']['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; $this-&gt;t('Save'),
      '#button_type' =&gt; 'primary',
    );

    // Render this field bellow the submit button and above return $form.
    if (!empty($formValues = $form_state-&gt;getValues())){

      $header = ["Key","Value"];

      $output = [];
      foreach ($formValues as $key =&gt; $value) {
        if ($key=='submit'){
          break;
        }
        $output[$key]['key'] = $key;
        $output[$key]['value'] = $value;
      }

      $form['mytable'] = [
        '#type' =&gt; 'table',
        '#header' =&gt; $header,
        '#rows' =&gt; $output,
        '#empty' =&gt; t('No Data'),
      ];
    }

    return $form;
}

public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    $form_state-&gt;setRebuild();
}


Soon I'll write a post about other ways to render form's data in a controller or even with a Private Temp Storage