vendor/anax/mvc/src/HTMLForm/FormController.php 1 location
|
@@ 68-76 (lines=9) @@
|
| 65 |
|
* Callback for submit-button. |
| 66 |
|
* |
| 67 |
|
*/ |
| 68 |
|
public function callbackSubmit($form) |
| 69 |
|
{ |
| 70 |
|
$form->AddOutput("<p><i>DoSubmit(): Form was submitted. Do stuff (save to database) and return true (success) or false (failed processing form)</i></p>"); |
| 71 |
|
$form->AddOutput("<p><b>Name: " . $form->Value('name') . "</b></p>"); |
| 72 |
|
$form->AddOutput("<p><b>Email: " . $form->Value('email') . "</b></p>"); |
| 73 |
|
$form->AddOutput("<p><b>Phone: " . $form->Value('phone') . "</b></p>"); |
| 74 |
|
$form->saveInSession = true; |
| 75 |
|
return true; |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
vendor/anax/mvc/webroot/cform.php 1 location
|
@@ 80-87 (lines=8) @@
|
| 77 |
|
], |
| 78 |
|
'submit' => [ |
| 79 |
|
'type' => 'submit', |
| 80 |
|
'callback' => function ($form) { |
| 81 |
|
$form->AddOutput("<p><i>DoSubmit(): Form was submitted. Do stuff (save to database) and return true (success) or false (failed processing form)</i></p>"); |
| 82 |
|
$form->AddOutput("<p><b>Name: " . $form->Value('name') . "</b></p>"); |
| 83 |
|
$form->AddOutput("<p><b>Email: " . $form->Value('email') . "</b></p>"); |
| 84 |
|
$form->AddOutput("<p><b>Phone: " . $form->Value('phone') . "</b></p>"); |
| 85 |
|
$form->saveInSession = true; |
| 86 |
|
return true; |
| 87 |
|
} |
| 88 |
|
], |
| 89 |
|
'submit-fail' => [ |
| 90 |
|
'type' => 'submit', |