public function init()
    {
        parent::init();

        $this->createEmbeddedWidgets();
        $this->enter_another_link->title = $this->enter_text;
        $this->enter_another_link->link = sprintf(
            "javascript:%s_obj.addRow();",
            $this->getId()
        );

        $this->enter_another_link->init();

        // init input cells
        foreach ($this->input_cells as $cell) {
            $cell->init();
        }

        /*
         * Initialize replicators
         *
         * Don't use getHiddenField() here because the serialized field is not
         * updated by the controlling JavaScript and will not contain added
         * replicator ids.
         */
        $data = $this->getForm()->getFormData();
        $replicator_field = isset($data[$this->getId() . '_replicators'])
            ? $data[$this->getId() . '_replicators']
            : null;

        if ($replicator_field === null || $replicator_field == '') {
            // use generated ids
            for ($i = 0; $i < $this->number; $i++) {
                $this->replicators[] = $i;
            }
        } else {
            // retrieve ids from form
            $this->replicators = explode(',', $replicator_field);
        }
    }