protected function generateJavascriptVar($baseName, $var = null)
 {
     if ($this->isModel($this->getOption('depends'))) {
         $var = $this->getOption('ref_method');
         if (substr($var, 0, 3) === 'get') {
             $var = substr($var, 3);
         }
     }
     return parent::generateJavascriptVar($baseName, $var);
 }
 /**
  * @param  string $name        The element name
  * @param  string $value       The date displayed in this widget
  * @param  array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
  * @param  array  $errors      An array of errors for the field
  *
  * @return string An HTML tag string
  *
  * @see sfWidgetForm
  */
 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     $this->setSourceParam('callable', $this->getOption('callable'));
     return parent::render($name, $value, $attributes, $errors);
 }