public function addToFormContainer(Nette\Forms\Container $container)
{
$container = $container->addContainer($this->key);
$container->addText('from', $this->name);
$container->addText('to', $this->name_second);
$this->addAttributes($container['from']);
$this->addAttributes($container['to']);
if ($placeholder_array = $this->getPlaceholder()) {
$text_from = reset($placeholder_array);
if ($text_from) {
$container['from']->setAttribute('placeholder', $text_from);
}
$text_to = end($placeholder_array);
if ($text_to && $text_to != $text_from) {
$container['to']->setAttribute('placeholder', $text_to);
}
}
}