Added simple method for create forms
This commit is contained in:
parent
ee83acf576
commit
0fe53c7260
1 changed files with 15 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ namespace PhangoApp\PhaModels;
|
|||
use PhangoApp\PhaUtils\Utils;
|
||||
use PhangoApp\PhaModels\CoreFields;
|
||||
use PhangoApp\PhaI18n\I18n;
|
||||
use PhangoApp\PhaView\View;
|
||||
|
||||
//Class ModelForm is the base class for create forms...
|
||||
|
||||
|
|
@ -476,6 +477,20 @@ class ModelForm {
|
|||
return $error;
|
||||
|
||||
}
|
||||
|
||||
static public function show_form($arr_form, $post, $pass_values=false)
|
||||
{
|
||||
|
||||
if($pass_values)
|
||||
{
|
||||
|
||||
$post=check_form($arr_form, $post);
|
||||
|
||||
}
|
||||
|
||||
return View::load_view([$arr_form, array_keys($arr_form)], 'forms/modelform');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue