/** * Returns javascript which creates an instance of the class defined in formJavascriptClass() * * @param int $repeatCounter repeat group counter * * @return string */ public function elementJavascript($repeatCounter) { $opts = json_encode(parent::getElementJSOptions($repeatCounter)); $id = $this->getHTMLId($repeatCounter); return "new FbUsergroup('{$id}', {$opts})"; }