Created
February 1, 2017 07:42
-
-
Save endihunter/84c1686b1ff6e0531b9fc3a49d455da9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function form() | |
{ | |
return $this | |
->scaffoldForm() | |
->update('fieldname', function ($e) { | |
return $e->setInput((new \Terranet\Administrator\Form\Type\Key('fieldname'))); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function form() | |
{ | |
return $this | |
->scaffoldForm() | |
->update('fieldname', function ($e) { | |
return $e->getInput()->setAttributes(['readonly' => true]); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Terranet\Administrator\Form\Type\Hidden; | |
... | |
public function form() | |
{ | |
return $this | |
->scaffoldForm() | |
->update('fieldname', function ($e) { | |
return $e->setInput((new \Terranet\Administrator\Form\Type\Hidden('fieldname'))->setValue(112)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment