Answers for "php //input button example"

23

html submit button

<input type="submit" value="Submit">
Posted by: Guest on November-28-2019
2

buttons in php

class StargazerButton extends \atk4\ui\Button {

  public $model;
  public $label;

  function init() {
    parent::init();

    $this->add(new Button(['Stars', 'basic blue', 'icon'=>'star']));
    $this->label = $this->add(new Label($model['stars'], ['basic blue left pointing']));

    $this->on('click', function() {
      $this->model['stars']++;
      $this->model->save();
      return $this->reload();
    });
  }
}
Posted by: Guest on August-12-2020

Browse Popular Code Answers by Language