/**
  * Form Widget Name Modifiers
  * Add a number dimension to the form name
  * Compatible with widget preview prototype (__i__)
  * 
  * @return string
  */
 public function getNameIdentifier()
 {
     $name = parent::getNameIdentifier();
     if ($this->getFormType()->getType() == 'widget') {
         $name = preg_replace('/-(\\d|__i__)/', '[$1]', $name);
     }
     return $name;
 }
Example #2
0
 /**
  * Get the form name identifier
  * 
  * @return string
  */
 public function getNameIdentifier()
 {
     $identifier = parent::getNameIdentifier();
     if ($this->isMultiple()) {
         $identifier .= '[]';
     }
     return $identifier;
 }