code: public function buildForm(FormBuilderInterface $builder, array $options)
      {
          parent::buildForm($builder, $options);
  
          $builder->add(
              'pagename',
              null,
              array(
                  'attr' => array(
                      'data-bind' => 'value: name, uniqueName: true, valueUpdate: \'afterkeydown\', event: {change: $root.editPage}',
                      'class' => 'form-control input-sm',
                  ),
              )
          );
  
          $builder->add(
              'templatename',
              'choice',
              array(
                  'choices' => $this->templates,
                  'attr' => array(
                      'data-bind' => 'value: template, uniqueName: true, valueUpdate: \'afterkeydown\', event: {change: $root.editPage}',
                      'class' => 'form-control input-sm',
                  ),
              )
          );
      }
docs: Builds the form
  
  @see FormTypeExtensionInterface::buildForm()