示例#1
0
 /**
  * This control only executes its on_success callbacks when it was clicked
  * @param FormUI $form The form to which this control belongs
  * @return bool|string A string to replace the rendering of the form with, or false
  */
 public function do_success($form)
 {
     if (isset($_POST[$this->input_name()])) {
         return parent::do_success($form);
     }
     return false;
 }
示例#2
0
 /**
  * Calls the success callback for the form, and optionally saves the form values
  * to the options table.
  * @param FormUI $form The form for which success is being processed
  * @return boolean|string A string to replace the rendering of the form with, or false
  */
 public function do_success($form)
 {
     /** @var FormControl $control */
     foreach ($this->controls as $control) {
         $control->do_success($form);
     }
     return parent::do_success($form);
 }