1. Go to this page and download the library: Download dcat-x/form-step library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dcat-x / form-step example snippets
use Dcat\Admin\Form;
$form = new Form(new User());
$form->multipleSteps(function ($step) {
// 第一步:基本信息
$step->add('基本信息', function ($form) {
$form->text('name', '姓名')->orm->text('phone', '电话');
$form->textarea('address', '地址');
});
// 第三步:确认信息
$step->add('确认', function ($form) {
$form->textarea('remarks', '备注');
});
});
return $form;