public function rebuildForm()
    {
        $this->rebuilding = true;
        // If form is plain, buildForm method is empty, so we need to take
        // existing fields and add them again
        if (get_class($this) === 'Kris\LaravelFormBuilder\Form') {
            foreach ($this->fields as $name => $field) {
                // Remove any temp variables added in previous instance
                $options =  Arr::except($field->getOptions(), 'tmp');
                $this->add($name, $field->getType(), $options);
            }
        } else {
            $this->buildForm();
        }
        $this->rebuilding = false;

        return $this;
    }
public function rebuildForm()
    {
        $this->rebuilding = true;
        // If form is plain, buildForm method is empty, so we need to take
        // existing fields and add them again
        if (get_class($this) === 'Kris\LaravelFormBuilder\Form') {
            foreach ($this->fields as $name => $field) {
                // Remove any temp variables added in previous instance
                $options =  Arr::except($field->getOptions(), 'tmp');
                $this->add($name, $field->getType(), $options);
            }
        } else {
            $this->buildForm();
        }
        $this->rebuilding = false;

        return $this;
    }
public function rebuildForm ( ) { $ this -> rebuilding = true ; // If form is plain, buildForm method is empty, so we need to take // existing fields and add them again if ( get_class ( $ this ) === 'Kris\LaravelFormBuilder\Form' ) { foreach ( $ this -> fields as $ name => $ field ) { // Remove any temp variables added in previous instance $ options = Arr :: except ( $ field -> getOptions ( ) , 'tmp' ) ; $ this -> add ( $ name , $ field -> getType ( ) , $ options ) ; } } else { $ this -> buildForm ( ) ; } $ this -> rebuilding = false ; return $ this ; }
Rebuild the form from scratch.

@return $this
Rebuild the form from scratch .