New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

administrcms/form

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

administrcms/form

Form package for the administrcms as good as standalone laravel package

Source
Packagist
Version
0.1.44
Version published
Total downloads
515
Maintainers
1
Created
Source

Form Builder for the administr package

Build Status Code Climate Test Coverage

Work-in-progress.

Radio groups

<?php

namespace App\Http\Forms;

use Administr\Form\Field\RadioGroup;
use Administr\Form\Form;
use Administr\Form\FormBuilder;

class TeamForm extends Form
{

    /**
     * Define the validation rules for the form.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'      => 'required|max:100',
        ];
    }

    /**
     * Define the fields of the form.
     *
     * @param FormBuilder $form
     */
    public function form(FormBuilder $form)
    {
        $form
            ->text('name', 'Name', ['translated' => true])
            ->radioGroup('is_visible', 'Is Visible', function(RadioGroup $group) {
                $group
                    ->radio('да', ['value' => 1])
                    ->radio('не', ['value' => 0]);
            })
            ->submit('save', 'Save');
    }
}

FAQs

Package last updated on 02 Feb 2017

Related posts